I lifted this piece from a longer Q&A so that I could include it in the New Testament Bible section.
What is that reality in relation to law and sin? Simple, when law is in place sin cannot be avoided. While we might intellectually formulate a grace answer as to how or why God allows sin the good news testifies that as LAW ONLY produced sin, Christ ONLY produces righteousness.
Do not be deceived, God is not mocked; for whatever a man sows, this he will also reap. For the one who sows to his own flesh will from the flesh reap corruption, but the one who sows to the Spirit will from the Spirit reap eternal life. Galatians 6:7-8
Now, the Christian religion poses these verses as if Paul was establishing a narrowly-defined moral code, but nothing could be further from the truth. If we follow Paul’s letter as he wrote it we would be hard-pressed not to notice that these verses come shortly after his demand that living by legal standards can only produce the contentions described in chapter 5. His whole point demanded that things can ONLY produce after their kind (remember Genesis?) so that if one is to change his grace into a legal system he is only setting himself up as one living under the law, and because law can only produce sin he cannot get around the inevitable outcome that a legal Christianity can only result in corruption!
A more probing question regarding morality would have us constantly asking whether we think we can get around the only possible outcome of following a formula, standard or law to achieve such a desired godly condition. The only true answer that could come back would demand that only in the freedom of Christ is there any true freedom.