My reply is because a couple of you try to make Matthew 7:21-23 say that those people thought they could earn heaven by their works when it says no such thing.
These people mentioned their works because they thought they were living like they were suppose to and had salvation already. Lord Jesus tells them no because they practiced lawlessness, which means they continued to live a carnal lifestyle. They did not give up their sinful ways by truly repenting of them and turning to walk in the Spirit.
The bible more than once says that if you are in Christ you are to walk as He walked, walk in the light and not darkness, walk in the Spirit and not in the flesh, obey the righteousness of the Lord and not the lusts of the flesh, and so on.
A true born again believer will have the Holy Spirit in them to guide them and the fruits of the Spirit will be evident in that persons walk, deeds, works, actions, speech, and rather they will receive salvation. The bible clearly says no fruits of the Spirit produced then that person is not born again, and that branch with no works will be gathered and burned up.
John 15:1-10
The True Vine
15 “I am the true vine, and My Father is the vine dresser. 2Every branch in Me that does not bear fruit He takes away; and every branch that bears fruit He prunes, that it may bear more fruit.3 You are already clean because of the word which I have spoken to you. 4 Abide in Me, and I in you. As the branch cannot bear fruit of itself, unless it abides in the vine, neither can you, unless you abide in Me.
5 “I am the vine, you are the branches. He who abides in Me, and I in him, bears much fruit; for without Me you can do nothing.6 If anyone does not abide in Me, he is cast out as a branch and is withered; and they gather them and throw them into the fire, and they are burned.7 If you abide in Me, and My words abide in you, you will ask what you desire, and it shall be done for you. 8 By this My Father is glorified, that you bear much fruit; so you will be My disciples.
9 “As the Father loved Me, I also have loved you; abide in My love. 10 If you keep My commandments, you will abide in My love, just as I have kept My Father’s commandments and abide in His love.