I don't want to go all anti-TWI on people, but this whole having to resort to looking through commentaries to get the deeper or perhaps the more correct meaning is (IMO) ridiculous. The Bible is written by believers for believers. There is no hidden "truth" that somehow explains the higher moral/greater good aspect of these social constructs. It can be assumed, because they come from "God" and the premise is that all that comes from "God" is "good", that doing all these things to one another is morally good in the sight of God. That means that slavery, stoning for offenses, and all this stuff was a natural, everyday this-is-how-it-is sort of thing.
People obviously do not believe this now. The bigger question is WHY? Why was one more holy then who stoned their kids to death over mouthing off to a parent? And why is it not the case now? What changed? It wasn't God.
You do get that Jesus, had Mary's family actually followed the law, should have never been born!