You do well if you really fulfill the royal law according to the scripture, “You shall love your neighbor as yourself.” But if you show partiality, you commit sin and are convicted by the law as transgressors. For whoever keeps the whole law but fails in one point has become accountable for all of it. For the one who said, “You shall not commit adultery,” also said, “You shall not murder.” Now if you do not commit adultery but if you murder, you have become a transgressor of the law. So speak and so act as those who are to be judged by the law of liberty. For judgment will be without mercy to anyone who has shown no mercy; mercy triumphs over judgment.
— James 2:8-13
It seems to me a lot is going on here. I find it interesting that this is one paragraph and one section in NRSV.
To show preferences (following on the last section I read this as showing preferences towards the rich) you sin by breaking the royal law of love. This reminds me so much of the tract by Leo Tolstoy, The Law of Love and the Law of Violence. I read it when I was a teen and at the time I saw myself as a practicing atheist. I picked it up because it was Tolstoy and thin (thinner than War and Peace). It preached a kind of Christianity I had never imagined before. It prepared the road for me to faith and to Quakerism. It doesn’t quite speak to me condition any longer. But I still love it as a part of the path I have walked.
The other thing I see James doing here is reminding us that there is no such thing as a small sin. You cannot break a part of the law. You break the law or you do not break the law. Yet if you do not show mercy you break the law.
If I do not forgive the injury another has done me I stand in the same place as the one who has injured me.
A Buddhist story (I forget where I heard it): Two monks are walking down the road. They come to a river — the bridge has been washed out. A woman is standing on the bank. The one monk picks her up and carries her across the river. Several hours alter, the second monk mentions it: You touched a woman. That is against our vows
The first monk replies, I left that woman on the river bank. You’re still carrying her.