On the other hand, society resolved through politics (such as Affirmative Action) that the compound interest and lasting synergistic effects of historical discrimination should be compensated for somewhat. The only way to do that is through more discrimination (i.e. relatively penalizing the least historically discriminated-against people).
I suspect this selective enforcement of the rules is one kind of such relative penalization.
What I don't understand is why do private companies take it upon themselves to do this. Is it genuine stakeholder concern (in conflict with profits)? ESG criteria giving them access to cheaper funding or tax breaks? Plain marketing? Virtue signalling?