Deuteronomy 25 · a question people ask
Why would a man have to marry his dead brother's widow?
The law gives its reason in its own words. It is for the dead brother: "the firstborn whom she bears shall succeed in the name of his brother who is dead, that his name not be blotted out of Israel" (25:6). It says whom she is not to marry: "the wife of the dead shall not be married outside to a stranger" (25:5). And it applies when "brothers dwell together, and one of them dies and has no son" (25:5). The law also says what happens if the brother refuses. If he "doesn’t want to take his brother’s wife", she goes "up to the gate to the elders" (25:7); the elders speak to him, and if he still says, "I don’t want to take her" (25:8), the refusal is made public (25:9-10). Genesis had already told of this duty in Judah's house: "Go in to your brother’s wife, and perform the duty of a husband’s brother to her, and raise up offspring for your brother" (Genesis 38:8).
The verses
“Judah said to Onan, “Go in to your brother’s wife, and perform the duty of a husband’s brother to her, and raise up offspring for your brother.””