Onan was to provide for his brother's widow and give her an heir. This phrase indicates that he used Tamar to fulfill his own sexual desires rather than help her. This was sinful. (See: [[rc://en/ta/man/translate/figs-euphemism]] and [[rc://en/tw/dict/bible/kt/sin]])
##### God preserves Judah's line #####
The Canaanite woman, Tamar, deceived her father-in-law, Judah, into having sexual relations with her. If it had not been for this act, Judah would not have any descendants to carry on his family line. Although her actions were wrong, God used them to protect his people. (See: [[rc://en/tw/dict/bible/kt/peopleofgod]])