Only to those who are under the Law. Under Grace, with the righteousness of Christ being imputed to the believer in Him, God says judicially, "Not Guilty!"
Take it or leave it, you can't have both.
You can tell God that right before He tells you Matt. 7:23 And then will I declare to them, I never knew you; depart from me, you workers of lawlessness.
You see God can be and is a God of mercy and justice. God instituted the Ten Commandments at Creation. He re-iterated it with Moses (oral tradition must have broke down) because mankind had forgotten it. Jesus lived it when he came to earth. It was preached by His Disciples. The Ten Commandments were kept in the Ark which was a copy of the one in Heaven. Psalms 111:7,8 All His precepts are sure. 8They are upheld forever and ever.