The reason we keep the law of the Lord is not to make ourselves perfect but because it's honoring to Him and the way He says is best to live.
The law of the LORD is perfect, restoring the soul. Those are powerful words from the pen of David. One of the reason they're so powerful is because they're universal. I cannot think of a person alive today, yesterday, or tomorrow who doesn't need a serious restoration project on his soul. We're all messed up, cracked, fading, unstable, broken, bruised, and generally destructive to ourselves and those around us.
While the law of God is not the source of our righteousness, it is the course of it. It is the path by which we honor Him and live in the way He says is best. It honors Him by treating Him as holy but also smart. And it turns out for our best - the restoration of our jonesed up souls. Holiness and wholeness are not opposed to one another. They're cause and effect.