One could rightly question whether God is rational or worth following if approving of some of the OT laws recorded. Why even consider the Bible as having any wisdom based on some of the OT laws? Who advocates stoning rebellious children (Deut. 21:18-21) or men having sex with animals (Lev. 20:15).
Some laws may be God accommodating the hearts of the Israelites. For example, why didn’t God simply outlaw slavery. Perhaps, the Israelites perhaps were close-minded to abolishing slavery. These are people who had to be told to not sacrifice babies and don’t have sex with animals (Lev. 18: 21, 23). Some laws were attempts to at least make improvements.
Many OT Laws were surely not God’s ideal. I doubt polygamy and concubines were God’s idea. But, God doesn’t overthrow but works within societies for freedom is necessary for authentic, lasting change. Loving control is an oxymoron. God’s interference or dictatorship can prevent a superior world from developing because of the moral improvement of free creatures.
Some laws recorded in the Bible could have been from the minds of fallible human beings though claiming to be from God.
God didn’t verbally dictate the entire Bible. We cannot be certain when God did or didn’t allow the writers the freedom to misunderstand and express their understandings of God. God’s uncontrolling love surely can explain some laws claimed to be approved by God. Some of the crazy OT laws obviously didn’t meet with God’s approval.
Does this mean we can never know what God thinks are good versus bad laws?
The Bible was never meant to take one’s mind and heart out of what are loving actions in one’s personal circumstances. And, what better person to look to for wisdom than one who sacrifices their life to convince that God loves and desires to help us be the kind of person we want to be deep down. Consider Jesus’ perspective when OT laws contradict common and loving sense.
Laws are not even necessary in a society when humans always treat others like they want to be treated. Laws are only necessary when love is lacking. Laws were never God’s ideal. All the laws in the world don’t change hearts. Lifelong transformation result from a relationship with one’s Creator. The existence of universal moral intuitions suggest a communicative God exists.