“Raise up offspring for your brother”
Then Judah said to Onan, 'Sleep with your brother's wife. Perform your duty as her brother-in-law and raise up offspring for your brother.' (Genesis 38:8 BSB)
What it sounds like today
A disturbing command that seems to sanction taking a brother's wife.
The cultural key
The instruction, shocking to modern ears, follows a recognized ancient institution: levirate marriage (from Latin levir, 'husband's brother'), later codified in the Law (Deuteronomy 25:5-10). When a married man died without a son, his brother was obligated to marry the widow; the first son she bore would legally count as the dead brother's child, inheriting his property and carrying on his name so that his line would not be blotted out. In a world with little firm hope of an afterlife, this was how a man 'lived on', through an heir. So Judah is not licensing adultery but commanding Onan to fulfill a family duty to his dead brother Er. Onan's sin is that he takes the pleasure but deliberately prevents conception, refusing to give his brother an heir while enjoying the widow, cheating both the dead and the living. Knowing the custom turns a baffling, sordid-seeming episode into a story about duty, greed, and the preservation of a family line, the same custom that later drives the book of Ruth.
Recovered meaning
Judah invokes levirate marriage: a brother must father a son for his dead, childless brother to preserve his name and line (Deuteronomy 25:5). Onan's sin is enjoying the widow while refusing to give his brother the heir he owed.