The Old Testament was just a chapter in the story of God rescuing His followers.
If you read the Old Testament without realizing that, it can appear to be a jumble of weird laws with odd punishments.
If you consider that it was written to the Israelites who were surrounded by other cultures and deities after being rescued by God from enslavement in Egypt, it makes more sense.
That’s the gist of Is God a Moral Monster, by author Paul Copan. He proposed a three-part framework for critically analyzing the Old Testament.
Realize the laws of the Old Testament were inferior to what God originally set up in Genesis 1 and 2.
Evaluate the text in context of the world in that Near Eastern period, not Western culture.
Keep in mind the Old Testament was a stop-gap set of laws meant only for Israelites.
The Old Testament was the first step of a plan to redeem the world
God's original plan was laid out in the first two chapters of Genesis. God created men and women as equals, with them becoming one flesh and living together in a sin-free world.
Because that plan was destroyed when people began choosing to prioritize themselves before God, a loving God embarked on the long trek back toward redeeming the human race.
It had to be slow, because God chose the incremental approach of altering the hearts of people in order to keep our free will intact. If he had tried to shift people from a patriarchal culture to one of full equality the plan likely would have been dead on arrival. God started in about 1440 B.C. with Moses creating a better version of laws compared to what other Near Eastern civilizations had.
Compared to law predating it, the Old Testament law was dramatically kinder
Old Testament laws are generally more humane than the most well-known law code of that era, the most notable of which was the Code of Hammurabi — created in about 1755 B.C.
For example, instead of thieves being killed as punishment according to the code of Hammurabi, Old Testament law simply demanded twice the compensation of what you stole, Copan wrote on page 104.
"This contrast is one of the many reminders that persons mattered more in Israel's legislation than in other cultures in the ancient Near East," Copan said on page 93. "On top of all this, in Babylonian or Hittite law, for example, status or social rank determined the kind of sanctions for a particular crime. By contrast, biblical law held kings and priests and those of social rank to the same standards as the common person," Copan added.
In Hammurabi's code, there's no ethical or spiritual principles. The foundation of the Old Testament Mosaic law, in contrast stresses the need to care for the widow and sojourners (outsiders). I appreciated how this blog post written for students outlines that the Old Testament law introduces concepts including:
Sanctity of human life
Favoring the privileged vs. protecting the oppressed
Justice
Mercy
Despite these and many other differences, some still argue Moses plagiarized Hammurabi’s code. There's no evidence that directly links the Old Testament law to Mesopotamian law codes. The similarities could be due to the limited amount of crimes being discussed.
Not meant for everyone, everywhere, nor forever
As Christians today, we’re not supposed to obey all of what is in the Old Testament because Jesus fulfilled the demands of the Old Testament. There are moral laws such as the 10 Commandments in the Old Testament which are repeated in the New Testament, validating that they still apply. This short video does a nice job summarizing which parts are relevant and why. I really appreciated how he compared some Old Testament laws to state laws relevant to that state, versus federal laws that apply in all 50 states.
"God's historical action of delivering enslaved Israel from Egypt becomes a model for how Israel is to live — for example, how to treat aliens and the disadvantaged in their midst," Copan wrote on page 68. Pastor J.D. Greear also separated the Old Testament into civil, ceremonial and moral laws, a distinction I found helpful.