You blame the law, then you blame the people. Which is it?
Now now now, no false dichotomies or straw men please. That is not nice.
It is not an either or. The purpose of the law was not to create righteous people!
Galatians 3:24
Romans 3:19-20
Now we know that whatever the Law says, it speaks to those who are under the Law, so that every mouth may be closed and all the world may become accountable to God; because by the works of the Law no flesh will be justified in His sight; for through the Law comes the knowledge of sin.
Romans 8:3-4
For what the Law could not do, weak as it was through the flesh, God did: sending His own Son in the likeness of sinful flesh and as an offering for sin, He condemned sin in the flesh, so that the requirement of the Law might be fulfilled in us, who do not walk according to the flesh but according to the Spirit.
James 2:10
Galatians 3:21
Romans 7:7
Galatians 2:16
Galatians 3:10-11
For as many as are of the works of the Law are under a curse; for it is written, "CURSED IS EVERYONE WHO DOES NOT ABIDE BY ALL THINGS WRITTEN IN THE BOOK OF THE LAW, TO PERFORM THEM." Now that no one is justified by the Law before God is evident; for, "THE RIGHTEOUS MAN SHALL LIVE BY FAITH."
Romans 3:28
Galatians 2:21
Romans 10:4
2 Corinthians 3:6-18
who also made us adequate as servants of a new covenant, not of the letter but of the Spirit; for the letter kills, but the Spirit gives life. But if the ministry of death, in letters engraved on stones, came with glory, so that the sons of Israel could not look intently at the face of Moses because of the glory of his face, fading as it was, how will the ministry of the Spirit fail to be even more with glory?
read more.
It is not like we don't have a mountain of scriptural data pertaining to the purpose of the law.
Roman's 10:4 indeed describes the swan song for the law.