Perform your duty ... raise up offspring for your brother: This reflects the custom of levirate marriage (a practice where a man marries his dead brother’s wife).
In this custom, if a man died without children, his brother or nearest relative would marry the widow. The goal was to have a child who would carry on the dead man’s name and inherit his property. This practice was later included in God’s law for Israel (Deuteronomy 25:5–10).
A close relative could refuse this duty, but he would be publicly shamed in the family for not preserving his brother’s name.