To love your neighbor as yourself is the foundation of the Torah.
To show favortism toward the rich and against the poor, you are not acting in love.
Not to love is to break the law.
Therefore, those who break the law (of love) are classed as “transgressors.”
That’s the logic of James.
That’s the logic of love.
In fact, James is radical about this. Notice these words in James 2:10:
For whoever keeps the whole law and yet stumbles at just one point is guilty of breaking all of it.
In James’ rhetoric, there are two options — and it is part of his rhetoric and one would have to have more from James than this letter to know his mind in more detail — one is either obedient (loving of others and of God) or one is a transgressor (not loving God or one’s neighbor). But here’s James’ point:
If you break the law in even in one point, you are guilty as a transgressor and therefore no different than the one who breaks it all. I don’t think there is evidence here to think of the “impossibility” of keeping the Torah; nor is there evidence that James is driving people to the Torah so they can seen their sinfulness and then cry out to God for mercy in the cross of Christ. James might believe that, but one could not prove it from this letter (James).
What James intends to do is to reveal to the messianists that their favortism of the rich and against the poor is downright sinful and they will stand before God as transgressors if they keep it up.
It’s simpler than that: James wants them to see that their conduct makes them transgressors. Notice how he finishes off in v. 11: “For he who said, “Do not commit adultery,” also said, “Do not murder.” If you do not commit adultery but do commit murder, you have become a lawbreaker.”