Remember way back in Genesis when Jacob had two wives, Rachel and Leah (he also had two concubines, but for legal purposes, we’re only talking about the two wives today)? Remember how he loved one (Rachel) and the other one was “unloved” (Leah)?
That’s the problem with a polygamist society. When one man has one wife, then the affections of each of them are given solely to the other. When there are more than one, it’s split, and someone invariably suffers.
It also creates a problem like the one in Deuteronomy 21. If you have two wives, you will also have two sets of children. And it may just be that you love one set of children because they came from the wife you love the most, but the actual firstborn is from the unloved wife. What do you do?
Deuteronomy 21 is very clear: You give a double portion to the actual firstborn, regardless of what you prefer.
Contextually speaking, the caveat to this law sits immediately after this Text. In the following verses (Deuteronomy 21:18-21), if a child is stubborn and rebellious towards their father, that child is executed. If that son is the firstborn of the “unloved wife” and the one you want to give a double portion to is next in line, then they would receive the portion instead. But that’s where things can get messy—and, possibly, also treacherous.
What’s interesting about this section is that the book of Genesis seems to counteract all of this. Isaac is the second son, but gets the inheritance. Jacob is the second son, but gets the inheritance over Esau. Joseph is the firstborn of Rachel (Jacob’s loved wife), but not the overall firstborn. Still, Joseph gets the birthright over Reuben (Genesis 49).
Is this Text then seen as a countermand to all of those instances? It’s possible, but it’s probably most valuable because it limits arbitrary blessings of one child or family over the other. Instead of a wife seeking to gain favor with her husband on behalf of their children, the law is simply the law. The firstborn—the true firstborn—gets the double portion.