Just one example:
21: “Not everyone who says to me, ‘Lord, Lord,’ will enter the kingdom of heaven, but the one who does the will of my Father who is in heaven.
22: On that day many will say to me, ‘Lord, Lord, did we not prophesy in your name, and cast out demons in your name, and do many mighty works in your name?’
23: And then will I declare to them, ‘I never knew you; depart from me, you workers of lawlessness.’
These are people who thought they had it figured out, that if they did really good things in Jesus' name He would accept them, but in reality were wicked because they were not in right relationship with God.