God gave to Moses his law, and everyone in his day broke it repeatedly. So has everyone done since then as well.
So did God screw up? Did one of his plans fail ... and fail big?
Nope. Because the purpose of the law wasn't to save mankind.
Instead, the purpose of the law was to show man how sinful he really was. It was to show him how far from God he was.
Paul says, "I would not have known sin if it were not for the law" (Rom 7:7 HCSB).
On average, people think they're pretty good Joes, because they compare themselves to the slobs around them. And so they think they're good in God's sight. But they're not.
So how does God get them to see that? He gives them the law, which is the expression of his will for us. Then, when they see the law, they see how sinful they are.
Paul gives the example of coveting. He didn't realize he was a sinner until the law told him, "Don't covet," and then he realizes, "Wow! I'm a coveter" (see Rom 7:8).
The purpose of the law is not to save us, but to show us how sinful we are so that we do, in fact seek out salvation. But salvation is not found in the law. It's found in Christ, through faith in Christ. This is the gist of Gal 3:19-26. "So the law was put in charge to lead us to Christ that we might be justified by faith" (Gal 3:24 NIV).
One final illustration. The law is like an annual physical at the doctor. You're feeling fine, but you go get your annual physical because it's a smart thing to do. And the physical reveals you have something drastically wrong, a dreaded disease. So your doctor sends you to specialists, and the specialists take charge of your care, and in a few months' time, the disease is gone.
Now what did the physical do? It didn't fix the problem. Instead it revealed the problem so that you could get it fixed. That's the law. It reveals, but it doesn't fix. It merely shows you that you really need Christ and his salvation.