God in His faithfulness sends His commands to avoid willful sin. These commandments have a positive side that are intent on bringing about character development. They invite us to places where life thrives instead of places where death thrives. There is life in the commandments (Lu 10:28) and death in sin (Rom 6:23). All God has said to us in the OT and the NT is to the end that we avoid the ways of death and choose the ways of life.
“My little children, these things I write to you, so that you may not sin. And if anyone sins, we have an Advocate with the Father, Jesus Christ the righteous.” 1 John 2:1 (NKJV).