If someone breaks the law, the penalty for breaking the law is imprisonment. But if someone takes your penalty for transgression of the law on themselve, in order for you to receive pardon, and to be free. Are you then not going to keep the law by not transgressing?
Jesus Christ was that someone who took the penalty of the law. So we as transgressors of the law can receive pardon for transgression(sin). But it wasn’t imprisonment, it was death. In regards to transgressing God’s law, the Ten Commandments.
Therefore, as recipients of God’s grace, to whoever puts their faith in the love of God through the sacrifice of His Son Jesus, keeps God’s law. And no longer chooses to live in transgression. in a profound appreciation to what was undeservedly given. The life of God’s only begotten Son to save the lives of sinners.
But if we are to continue to live in transgression by not keeping God’s law, we deny His love by unbelief. Choosing not to accept the free gift of His love, He offers to us by faith.