Conviction. Most people don’t enjoy feeling conviction, but the problem come when they deny the need to feel convicted. James has been discussing favoritism and partiality and finally lays it out here.
If, however, you are fulfilling the royal law according to the Scripture, ” you shall love your neighbor as yourself ,” you are doing well. But if you show partiality, you are committing sin and are convicted by the law as transgressors.
James 2:8-9 NASB
Showing favoritism is sin. There’s no way around that and no excuse for it. Jesus commanded us to love our neighbor as ourselves, but if we show favoritism, then we are breaking that as some people we are not loving as others. We must understand that if we are going to follow Christ, we would treat people as Christ would treat them. Anything less than that is sin.