In Romans 5:20 it says, "The Law came in so that the transgression would increase; but where sin increased, grace abounded all the more." This means that the purpose of the Law as given in the Old Testament was to bring about judgment. Of course, how can there be judgment if we don't know what the rules are. That's exactly what the Law does. It gives us the rules, we realize that we've broken them, and thus, the sin becomes evident to us.
It's been said that the Law is like a mirror. The mirror serves one purpose and one purpose only; and that's to reflect an image. When we look into the mirror (the Law), it shows us who we really are. We can get another mirror, break that mirror or totally disagree with that image that we saw looking back at us. However, that will not change anything.
It is only the grace of God that can change that image and that grace is freely dispensed upon all who would but come and ask.