H.L. Strack and Gunter Stemberger, Introduction to the Talmud and Midrash: Second Edition, trans. and ed. Markus Bockmuehl (Minneapolis: Fortress, 1996) 176.
In Shab 2.6 we read that women die in childbirth...because of three transgressions.
The three transgressions that the Mishnah lists are (in Danbury's translation) "heedlessness of the laws of the menstruant, the Dough-offering, and the lighting of the [Sabbath] lamp."
Babylonian Talmud 31b-34a contains an extensive discussion of this passage, or, more accurately, this passage is a launch-pad for other discussions about divine punishment of sin. In some cases, disobedience can hurt not only the sinner, but also the people he loves. For example, Rabbi Nathan said that a man's wife could die if he failed to pay his vows, and Rabbi stated that his kids could die young.
Modern Christianity is rather mixed about this sort of religion. In the book, Every Man's Battle, one of the authors said that he feared his sexual immorality was depriving his family of spiritual protection. When I lived in New York, and Tim Keller was on vacation from Redeemer, I visited Times Square Church, pastored by David Wilkerson of The Cross and the Switchblade fame. He emphatically denied that our sins can motivate God to punish the people we love. He referred to the Golden Calf story, in which the Levites kill their own kin, and he seemed to disagree with this portrayal of God (if I understood him correctly; I'm sure he has a high view of biblical inspiration!). I know someone who didn't participate in communion because she wasn't sure if she believed in it, and she was afraid that something awful would happen to her family. "I actually believed in that kind of God," she said, after the communion came and went and nothing had happened to the people she loves.
When I watch Little House on the Prairie, Touched by an Angel, and Highway to Heaven, the message that comes out is that God is not responsible for the horrible things that happen. That may be the "official stance" of modern-day religion. Yet, the fact that it's repeated so often may indicate that a lot of people feel deep down that misfortune is God's punishment of people for their sins.
The Scriptures are mixed on this issue. Deuteronomy and Proverbs think that God punishes people's sins. There are some Psalms like that, except when the Psalmist is baffled about why he has to suffer, being the righteous person that he is. Job presents suffering as a mystery known only to God, yet the story-part narrates that Job suffered because God was testing his faithfulness.
When we get to the New Testament, Jesus denies that a blind man, Galileans killed by Pilate, and the victims of the Tower of Siloam experienced their misfortunes on account of their sins. Yet, he tells a man he heals to sin no more, lest something worse befall him. The Epistle of James connects healing with the forgiveness of sins, implying perhaps his belief that sin causes disease. But other parts of the New Testament present suffering as something that builds Christian character.
Even rabbinic literature can be quite nuanced. Some voices recognized that there are righteous people who suffer and wicked people who prosper. But they are clear that everything will be equalized in the afterlife. According to one tradition, the righteous are receiving punishment for their few sins in this life, so that they can have an eternity of bliss in the afterlife. And the wicked are getting it easy in this life, so that they'll get loads of punishment in the afterlife. So things are ultimately fair, the rabbis believed.
Much of religion is an attempt to control life. Many of us believe that the existence of an omnipotent God should make life a little more predictable, or hopeful. That's why we pray for healing of ourselves or our loved ones, or a promotion at work, or a wife or husband.
And is this wrong? Skeptics like to point out that religionists try to have it both ways: when good things happen, we're supposed to attribute that to God. Maybe he's blessing us out of his free grace, or he's rewarding us. But when bad things happen, we say that God is not at fault. But isn't God powerful enough to stop bad things from happening? Can there be meaningless suffering in a universe where God exists?
Something else about the Mishnah passage: What I like about it is that it says people should honor God. It's not really talking about someone who has issues with faith and chooses to sit out of communion, but rather a person who rejects God's order. Someone who doesn't say "thank you" to God by giving a dough offering is being ungrateful, period. Of course, in that culture, probably everyone believed in God, meaning there weren't people who said, "Well, why should I give my dough? How do we even know this God exists?" So people were most likely withholding their dough from a God they believed in, and that was selfish.
But should we honor God with the mindset that he is some kind of ogre, eager to strike us down when we do something wrong? I can understand that there should be consequences for sin. Can one believe in this, without viewing God as an ogre?