The two most important parts of OT Law in regards to God's overall plan are also the two most hammered on by critics: the Laws regarding slavery and marriage.
In regards to slavery, there are two purposes to the Jewish concept. First, the practical (every day living) purpose, which isn't one of an oppressive system, but one where slaves had rights and the institution was essentially a 'social safety net',
this website has the most complete explanation of the practical purpose that I have found online.
The second purpose of the Laws regarding slavery is to provide a legal (for lack of a better term) framework for the redemption of humanity. The essential piece of this is in Leviticus 25:47-55:
“47 'Now if the means of a stranger or of a sojourner with you becomes sufficient, and a countryman of yours becomes so poor with regard to him as to sell himself to a stranger who is sojourning with you, or to the descendants of a stranger's family,
48 then he shall have redemption right after he has been sold. One of his brothers may redeem him,
49 or his uncle, or his uncle's son, may redeem him, or one of his blood relatives from his family may redeem him; or if he prospers, he may redeem himself.
50 He then with his purchaser shall calculate from the year when he sold himself to him up to the year of jubilee; and the price of his sale shall correspond to the number of years
.....
55 For the sons of Israel are My servants; they are My servants whom I brought out from the land of Egypt. I am the Lord your God."
So if someone sells themselves into slavery, they can be bought from it by a blood relative, for the price of however many years the person would be in bondage. This is the concept often referred to as the “kinsman-redeemer”, which we will explore later. Now, we'll go over what happened at the Fall:
1. Adam & Eve sold us into the bondage of shame for a piece of “fruit”; based on the lie that they should be like God in knowing good and evil (Genesis 2:17, Genesis 3). In seeking to know what is good, they only discovered how they missed the mark.
2. In doing so, they became slaves to shame (John 8:34-36; Romans 6:16, 7:9-11; 2 Peter 2:19; Galatians 5:1; Ephesians 2:1)
Now some argue that when Adam and Eve did this, they also gave up their dominion of the earth, under God's authority, to Satan. OT slave law allowed slaves to keep property; however, when Satan offered Jesus the world in exchange for worship, yet Jesus did not deny Satan's ability to do so (Matthew 4:8-10), nor Satan's claim that the world was relinquished to him (Luke 4:5-8).
So what does this mean for us? Since we are slaves to sin, then to release us from that slavery requires a payment from a kinsman to redeem us from it. So what's the price of sin?
It is death (Romans 6:23).
That's what God meant when he told Adam he would die if he ate of the Tree of the Knowledge of Good and Evil. So humankind needed a kinsman to pay the price of death in order to release us from sin. The problem is that it isn't in the power of someone who themselves is a slave. The Book of Ruth illustrates the concept, especially in chapter 4:
3 "Then he said to the closest relative, "Naomi, who has come back from the land of Moab, has to sell the piece of land which belonged to our brother Elimelech.
4 So I thought to inform you, saying, 'Buy it before those who are sitting here, and before the elders of my people. If you will redeem it, redeem it; but if not, tell me that I may know; for there is no one but you to redeem it, and I am after you.'" And he said, "I will redeem it."
5 Then Boaz said, "On the day you buy the field from the hand of Naomi, you must also acquire Ruth the Moabitess, the widow of the deceased, to raise up the name of the deceased on his inheritance."
6 The closest relative said, "I cannot redeem it for myself, because I would jeopardize my own inheritance. Redeem it for yourself; you may have my right of redemption, for I cannot redeem it."
7 Now this was the custom in former times in Israel concerning the redemption and the exchange of land to confirm any matter: a man removed his sandal and gave it to another; and this was the manner of attestation in Israel.
8 So the closest relative said to Boaz, "Buy it for yourself." And he removed his sandal.
9 Then Boaz said to the elders and all the people, "You are witnesses today that I have bought from the hand of Naomi all that belonged to Elimelech and all that belonged to Chilion and Mahlon.
10 Moreover, I have acquired Ruth the Moabitess, the widow of Mahlon, to be my wife in order to raise up the name of the deceased on his inheritance, so that the name of the deceased will not be cut off from his brothers or from the court of his birth place; you are witnesses today."
11 All the people who were in the court, and the elders, said, "We are witnesses. May the Lord make the woman who is coming into your home like Rachel and Leah, both of whom built the house of Israel; and may you achieve wealth in Ephrathah and become famous in Bethlehem.
12 Moreover, may your house be like the house of Perez whom Tamar bore to Judah, through the offspring which the Lord will give you by this young woman." ...... 14 Then the women said to Naomi, "Blessed is the Lord who has not left you without a redeemer today, and may his name become famous in Israel."
So in order for a relative to redeem a slave, they must be willing, able, and can pay the price in full, meaning dying wasn't enough, but death had to be beaten in order to prove the fullness of the payment. Another human cannot pay the price, so what did God do? He became flesh (John 1:14).
One of the important aspects of the Gospels, and the entire Bible for that matter, that is often overlooked is the genealogies. Without those, we have no proof that Jesus is indeed a kinsman of Adam, and therefore, all of us.
All the Gospels save Mark contain a genealogy. Matthew focuses on the direct male line from Adam to Jesus, emphasizing His claim to the throne of Israel. Some readers will object, saying that Jesus was not Joseph's biological son, except Joseph, by marrying Mary, legally adopted her child, which was reinforced when he went to the Temple and presented Jesus as his son (Luke 2). The genealogy in Luke deviates from Matthew. This is likely because Luke is tracing Mary's genealogy; but why does the line jump from Heli to Joseph? Because Mary had no brothers, so when Mary married Joseph, he became the heir to Heli. This also sidestepped the Curse of Coniah in Jeremiah 22:24, since Mary was a blood descendant of David, but not through Jeconiah.
(In case someone mentions that there is no genealogy in the Gospel of John, it's listed in John 1:1-2, and 1:14. John focused his Gospel on the divinity of Christ, and wrote an evangelistic gospel per John 20:31.)
So now we have our kinsman-redeemer, a blood-relative who was able to pay the price through His death and resurrection, as stated many times in the Epistles, but also by Jesus Himself (Mark 10:45; John 10:17-18). He is both of direct male lineage of the Kings of Israel, both by law and blood. This is why Jesus had to be sinless and Himself not in bondage to sin. It also is why His bodily resurrection is vital, and to deny either is to deny that Jesus released us from sin.
The confirmation of our redemption from bondage through Christ is found in Revelation chapter 5. The description of the scroll matches one that the Romans and Greeks of John the Apostle's day would use when dealing with estate, or inheritance law. They would write the contract on the inside, seal it with several seals to prevent someone from reading it prematurely, then write the title and name of the scroll on the outside. Note this is the opening event of the tribulation, where Christ opens the scroll, giving Him the Earth, that His blood has purchased, and proceeds to secure His Kingdom for us in the next 15 chapters.
There is one last important piece to OT slavery law. A master could marry a slave, or give the slave in marriage to his son; however, doing this automatically freed the slave and made said slave his daughter (Exodus 21:7-10; Deuteronomy 21:10-14; 1 Chronicles 2:34-35).