I would like to know why God gave the Law. Up to the time of Moses, people had a relationship built on faith. Other than the conclusion, “the law is to show up your sinful nature” why do you think God gave the Law?
First of all let’s clarify something. The Law wasn’t introduced by Moses, it was simply formalized at that time. Parts of the Law had been in effect since Adam and Eve. When God made clothing for them using animal skins, He was performing the first animal sacrifices, in effect covering their sins by the shedding of innocent blood.
A careful reading of Genesis 4 reveals that both Cain and Abel knew the kind of offering God required. God told Cain, “If you do what is right, will you not be accepted? But if you do not do what is right sin is crouching at your door (Genesis 4:7). Noah knew the difference between clean and unclean animals (Genesis 7:2-3) and which kind to offer to the Lord (Genesis 9:20).
That said, in Romans 3:20 Paul said, “Therefore no one will be declared righteous in his sight by observing the law; rather, through the law we become conscious of sin.” Without the standard provided by the Law there’s no way to tell what is sin and what is not, just like without a posted speed limit there’s no way to tell what is speeding and what is not.
When Jesus clarified the requirements of the law in Matt. 5-6, He showed that God’s standards are so high that even the Pharisees, who were obsessive about keeping the law, could not hope to achieve the righteousness God requires (Matt. 5:20). His purpose was to demonstrate man’s inescapable need for a Savior.
In summary the Law was given to quantify God’s requirements for righteousness, so we would know what He expects, and to convince us that without a Savior we can never meet His requirements.
Or as Paul put it, “Therefore the law was our schoolmaster to bring us unto Christ, that we might be justified by faith” (Galatians 3:24).