No Israelite was ever saved by keeping the law of Moses. No obedience could make them righteous before God. (Romans 3:20) Since the law could not save, why did God give the law to Israel? Speculations abound about the purpose for the law, but speculation is not necessary. The Bible gives several specific reasons why the law was given.
God told the Israelites the law was to protect them from idolatry. (Deuteronomy 4:9-14) The nations in Canaan and the nations surrounding Canaan worshiped many false gods. The law served to remind Israel their God is the only true God. The law reminded them of the mighty miracles God performed when He delivered them from Egypt and brought them into the promised land. The law was given so Israel would only worship Jehovah and so Israel would remain confident in Him. (Psalm 78:5-7)
The law was given to set the Israelites apart from the Canaanites and other pagan nations. The Israelites were set apart from all the rest of the world by God. Through the keeping of the law the Israelites secured their position as a “kingdom of priests, and an holy nation” to the Lord. (Exodus 19:6) This unique status was reflected in their keeping of the law. Because God is holy, He gave the law to His people to teach them to be holy as well. (Leviticus 20:7-8) Because Israel was set apart for God the law was given to keep them set apart.
God gave the law to convict men of sin. (Romans 3:19; Galatians 3:22) The law makes clear that no man can meet the standard of God’s of perfect righteousness. Because of the law no person has any excuse before God. Everyone is guilty. “For whosoever shall keep the whole law, and yet offend in one point, he is guilty of all.” (James 2:10)
The conviction of the law goes hand in hand with the Christ oriented purpose of the law. The law was given as a teacher to drive people to Jesus. (Galatians 3:25) By showing the impossibility of perfect obedience, the law points sinners to the only One who can make the unrighteous righteous. The law does not save, but the law points humanity to the salvation that is only possible by faith in Jesus. This has been the law’s purpose since it was first given. Before Jesus was born the law pointed men to the promised Christ. The many sacrifices of the law were a constant reminder to the Israelites that death is the wages of sin and a constant reminder of the promise of God to send a deliverer who would suffer the wages of sin in their place.
The law was a wonderful gift given to the Israelites. Those who believed God could say, with David, “Oh how I love thy law.” The restrictions and requirements seem severe to modern readers, yet each command was given by God for a good purpose.