I fully submit to the Church's teachings on contraception, so this post isn't meant to debate the morality of that. I'm honestly wondering a few things from this passage, and would really appreciate some insight from the Bible scholars out there.
It seems that the Church always references the sin of Onan in her stance against contraception. I've heard different adaptations of this, one in which God slew Onan because he was instructed to have intercourse with his brother's wife to preserve his brother's lineage, not neccessarily because of the contraceptive act. Reading the passage it certainly seems that way, because later Judah "patronized" Tamar after she tricked him into thinking she was a prostitute, and all was well. This passage confuses me for a number of reasons because why would God want Onan to have sex with his brother's wife in the first place? God is the same yesterday, today, and forevermore, but later in the book of Leviticus, God says in 18:16 "You shall not have intercourse with your brother's wife; that would be a disgrace to your brother." He also says in Leviticus 18:15, "You shall not have intercourse with your daughter in law." How do we know that God didn't strike him down for sleeping with his brother's wife? The Bible noted that God also struck down Er, the older brother, for offending The Lord, although it didn't note the offense. How come He didn't strike down Judah for his treatment of Tamar as a prostitute? That's an offense against The Lord too, right?
I mean no disrespect to our Faith, so please be respectful in your replies. I'm not questioning anything the Church teaches. I'm hoping to be enlightened.