Why the Law?
Paul’s persuasive argument that the promise is superior to the law raises an obvious question: What was the purpose of the law? Paul’s answer is that the law reveals man’s utter sinfulness, inability to save himself, and desperate need of a Savior—it was never intended to be the way of salvation (Romans 7:1–13).
The Faithlife Study Bible: Paul’s point is that the law was added subsequent to the covenant that God had made with Abraham. Paul’s statement here can be interpreted to mean that the law’s purpose was to define sin (Romans 4:15) or to increase sin (Romans 5:20).
In Galatians 3:20, Paul’s point is apparently that a “mediator” is required when more than one party is involved, but God alone ratified the covenant with Abraham.
Wiersbe writes: when God gave the Law to Israel, he did it by means of angels and through the mediation of Moses. Israel “received the Law by the disposition of angels” (Acts 7:53). This means that the nation received the Law third-hand: from God to angels to Moses. But when God made his covenant with Abraham, he did it personally, without a mediator. God was revealing to Abraham all that he would do for him and his descendants. A mediator stands between two parties and helps them to agree; but there was no need for a mediator in Abraham’s case since God was entering into a covenant with him, not Abraham with God. “God is only one,” suggests there was no need for a go-between.
Galatians 3:19–20New American Standard Bible: 1995 Update
Why the Law then? It was added because of transgressions, having been ordained through angels by the agency of a mediator, until the seed would come to whom the promise had been made.
Now a mediator is not for one party only; whereas God is only one.