I think you’re on the right track. I replied to a sibling comment with some other good reasons for discriminating based on race. Basically, race is a pretty good shorthand for a shared experience of a group, and there are genuine instances where that shared experience can be leveraged to do good things.