Exodus 20:20 - Moses said to the people, "Do not be afraid; for God has come in order to test you, and in order that the fear of Him may remain with you, so that you may not sin."
An entire nation had just been liberated from slavery. God had performed His most visible miracles in all of scripture in a very short period of time right before the Israelite’s very eyes. From plagues, to pillars of fire, to parted seas, God had proven that He was faithful to His people and that their deliverance could only be attributed to Him.
Yet it was not enough to deliver the people of Israel from their physical suffering. It was not enough to answer their cries for freedom and hope. It was not enough to prove His Sovereignty beyond any shadow of a doubt. It was not enough to simply relocate His people.
The goal of the Exodus was not deliverance. It was redemption.
As God began to give Moses the Ten Commandments and the rest of the Law, He did for us what we could not do for ourselves. By providing us with His standards, God allowed us to see in ourselves the true depth of our sin. He allowed us to see how far we are from where He requires us to be. He exposed sin for what it is; a divide between God and man that we alone cannot overcome.
The law, for the first time in human history, caused us to see our need for a savior.