Jesus said its to those who work iniquity=practice a sin or willfull sin
No it's not about wilful sin. Those people didn't say "but Lord I believed you died for my sins so I could continue sinning all I wanted"... They said "I did many mighty good things in your name".. they were trusting in themselves, and not in Jesus.
"For whoever keeps the whole law and yet stumbles at just one point is guilty of breaking all of it." - James 2:10
You are a worker of lawlessness. You are guilty of breaking the whole law just like everyone else. Therefore you cannot be saved by your works, because you've already failed.
You have worked iniquity. On judgement day you're going to tell God "but I did many good things and went door-to-door and did this and I did that"... just like those people saying they prophesied in his name and did many miracles and cast out demons. You're trusting in your own works. And as we've just seen in James 2:10, you're guilty of breaking the whole law. That makes you a worker of lawlessness!
So no amount of work on your part will save you. Someone has to pay for your sins for you. This is not of yourself or your own doing. It is the gift of God through Christ Jesus our Lord.
But yes, when you believe Jesus has paid for your sins and you repent of them, good works will follow. How can you believe in your heart that your sins deserve death and continue doing them? In believing Jesus died for them, you believe your sins deserve death.
If you think his UNDESERVED favour (grace) means you can sin all you want, then it shows you haven't repented of your sins, and it shows you can't possibly really believe that they deserve death, or that Jesus paid that death penalty for you.
Or do you show contempt for the riches of his kindness, forbearance and patience, not realizing that God’s kindness is intended to lead you to repentance? - Romans 2:4
Repentance is not works. It's a change in heart and belief about your sins. You ask God for forgiveness, and trust Jesus paid the penalty for you.
But let's make this very clear: even asking to be forgiven is not what saves you. People in Islam repent as well and ask for forgiveness. Nothing that YOU DO will ever save you. It's purely by trusting in Christ's sacrifice for you that saves you.
8 For it is by grace you have been saved, through faith—and this is not from yourselves, it is the gift of God— 9 not by works, so that no one can boast. - Ephesians 2:8-9
NOT FROM YOURSELVES
NOT BY WORKS
GIFT OF GOD
GRACE = UNDESERVED FAVOUR
FAITH = TRUSTING IN HIM FOR YOUR SALVATION
I do not set aside the grace of God, for if righteousness could be gained through the law, Christ died for nothing! - Galatians 2:21
This righteousness is given through faith in Jesus Christ to all who believe. There is no difference between Jew and Gentile - Romans 3:22
RIGHTEOUSNESS COMES THROUGH FAITH IN JESUS AND WHAT HE DID FOR YOU. NOT FROM YOUR GOOD DEEDS OR WORKS. BECAUSE IF IT COULD COME FROM YOUR GOOD DEEDS AND WORKS CHRIST DIED FOR NOTHING.
Christ is the culmination of the law so that there may be righteousness for everyone who believes. - Romans 10:4
HE FULFILLED THE LAW FOR YOU
God made him who had no sin to be sin for us, so that in him we might become the righteousness of God. - 2 Corinthians 5:21
AND HE DIED FOR YOUR TRANSGRESSIONS
HE LIVED THE LIFE YOU SHOULD HAVE LIVED AND DIED THE DEATH YOU SHOULD HAVE DIED
SO IT IS NOT WHAT YOU DO THAT SAVES YOU
IT IS WHAT HE DID FOR YOU THAT SAVES YOU
AND THIS IS NOT OF YOURSELVES, IT IS THE GIFT OF GOD, LEST YOU SHOULD BOAST AND BE SELF-RIGHTEOUS