What about what Onan did displeased Yahweh?

Answer From The Annual Reading Schedule - Week 10 Notes For Genesis: The text in Genesis 38:9 seems to indicate that he did what he did because he did not want to give an offspring to his brother. We don't know if he had hated his brother or if he was simply wanting to avoid the responsibilities, or what the reasons, but what was displeasing is not raising up the offspring for his brother. The Torah states in Deuteronomy 25:5-6 that this is called the duty of a husband's brother. It seems that Onan was trying to avoid this duty but still obtain pleasure.

Related Topics