The Jews believed that obeying the law would save them and make them righteous. But the apostle Paul declares here that “in God’s sight, no person will be justified by obeying the rules of the law”. The reason for this claim is clear: no one can completely obey the law. Only those who observe the whole law in very detail will be considered righteous. But completely obeying God’s law is impossible.
The law was given so that everyone, whether Jew or non-Jew, would know that no one could keep it. In this way it would be proven to everyone that all Jews and non-Jews are sinners in the sight of God. The law informs us of our sin and guilt. The law reminds us how high the standards of God are and how far we have fallen short of those standards.