You are missing the point. Faith without works is in vain. As the Bible states Satan and the other fallen angles believe but that changes nothing. So to if a person believes but does nothing their faith is in vain. Jesus looks into their hearts and perceives their true belief.
Why do you ignore James 2?
Also works without faith is dead.
I have highlighted the above because it is true.
Jesus looks at the hearts of people who place their faith in him.
Notice I say "Place and not proclaim"
That is why we need to be very careful indeed when we judge and why.
Jesus is the ultimate judge.
It is him and him alone who separates the sheep and the goats.
We need to look at the whole of James 2 and not just a few verses.
Yes it talks about works.
But it is addressing
Poverty, generosity and prejudice.
James 2:1-4
Chapter 2
Beware of Personal Favoritism
1 My brethren, do not hold the faith of our Lord Jesus Christ, the Lord of glory, with partiality. 2 For if there should come into your assembly a man with gold rings, in fine apparel, and there should also come in a poor man in filthy clothes, 3 and you pay attention to the one wearing the fine clothes and say to him, “You sit here in a good place,” and say to the poor man, “You stand there,” or, “Sit here at my footstool,” 4 have you not shown partiality among yourselves, and become judges with evil thoughts?
James is alluding to
Leviticus 19:15
15 “You shall do no injustice in judgment. You shall not be partial to the poor, nor honor the person of the mighty. In righteousness you shall judge your neighbor.
If you fall foul of that then you fall foul of the royal law.
If you fall foul is the royal law then you are guilty of breaking the whole law.
James 2:8-10
8 If you really fulfill the royal law according to the Scripture, “You shall love your neighbor as yourself,” you do well; 9 but if you show partiality, you commit sin, and are convicted by the law as transgressors. 10 For whoever shall keep the whole law, and yet stumble in one point, he is guilty of all.
James 2:12
12 So speak and so do as those who will be judged by the law of liberty.
What is the law of liberty?
The law of love, the royal law.
So to the verse that people focus on
James 2:14
Faith Without Works Is Dead
14 What does it profit, my brethren, if someone says he has faith but does not have works? Can faith save him?
What are the works he is taking about?
James 2:15-17
15 If a brother or sister is naked and destitute of daily food, 16 and one of you says to them, “Depart in peace, be warmed and filled,” but you do not give them the things which are needed for the body, what does it profit? 17 Thus also faith by itself, if it does not have works, is dead.
Judgement day, sheep and goats
Matthew 25:35-36
35 for I was hungry and you gave Me food; I was thirsty and you gave Me drink; I was a stranger and you took Me in; 36 I was naked and you clothed Me; I was sick and you visited Me; I was in prison and you came to Me.’