I'll never forget, prior to my conversion several years ago, I read Matthew 7:22 and thought to myself, wow! These many people accomplished all of that, "prophesied in His name, cast out demons, and did many wonderful works" but that still was not "good enough?" Then I thought to myself at that time, how am I going to "top that" and be "good enough?"
Such is the mindset of someone who believes that salvation is by works.
Matthew 7:21 - Not everyone who says to Me, 'Lord, Lord,' will enter the kingdom of heaven, but he who does the
will of My Father who is in heaven will enter.
John 6:40 - For my Father’s
will is that
everyone who looks to the Son and believes in Him shall have eternal life, and I will raise them up at the last day.
These many people (unbelievers) in Matthew 7:22 had the wrong foundation. They were trusting in their works to save them and NOT IN CHRIST ALONE. Jesus NEVER knew them which means they were NEVER saved. *Seeking salvation by works is
not the will of the Father.
John 17:3 - And this is eternal life, that they may
know You, the only true God, and Jesus Christ whom You have sent. The term "know" implies intimate, experiential knowledge, through a relationship with Him, not merely theoretical knowledge. These many people were not true converts.
Without faith it's impossible to please God no matter how many alleged wonderful works that these many people set out to conjure up through the flesh in a vain effort to receive salvation based on works. Jesus referred to them as WORKERS OF INIQUITY/LAWLESSNESS! They were still in their sins. There are false prophets who prophecy in the name of Jesus and even make false prophecies.
Also, Satan may grant the power to one of his agents to cast out demons from another of his agents in order to gain attention and loyalty from an audience for his own evil agenda. False teachers and false prophets have long demonstrated supernatural power granted by Satan, including the power to control the demonic realm. The enemy may use this deception to in order to win an audience for his claims.
In Matthew 10:1, we also see that Jesus gave His 12 disciples power over unclean spirits, to cast them out, and to heal all kinds of sickness and all kinds of disease. This would include Judas Iscariot, yet Jesus referred to Judas Iscariot as an
unbelieving, unclean devil who would betray Him! (John 6:64-71; 13:10-11).
Apparently, Judas believed that Jesus' name has the power to cast out demons but
did not truly believe in His name (John 1:12) and become a child of God, but instead was the
son of perdition (John 17:12).