What shall we say then? Is the law sin? Certainly not! On the contrary, I would not have known sin except through the law. For I would not have known covetousness unless the law had said, “You shall not covet.” Romans 7:7
All over the world, in seemingly safe settings—fields, jungles, pastures, farmlands—there are signs posted: “DANGER: DO NOT PROCEED.” The signs also explain why. With words and dramatic graphics, they say, “LAND MINES.” There are millions of land mines buried in former war zones all over the world, never dug up following the cessation of hostilities. And those mines kill or maim thousands of innocent civilians each year in locations where no warning signs are posted.
Those warning signs are not intended to deprive anyone of the pleasure of enjoying the land. They are meant to save lives, to warn of danger, to encourage people to take a different path. The signs do what the Law of God does: It warns us of choices and behaviors that are offensive to a holy God. For instance, the apostle Paul said he would never have known that coveting was offensive to God unless the Law said, “You shall not covet.”
God’s laws are signs of His grace and love. They are there to lead us in the path of righteousness and life.
When the law of God is written on our hearts, our duty will be our delight. Matthew Henry