I don’t think it’s possible to knee jerk harder than you have here. Obviously race is not the singular factor and it’s disingenuous to actual discussion to make a claim like that.
In the US, it isn't illegal to per se to consider race in hiring and firing decisions. The extent of the legal wiggle room that exists for various kinds of affirmative action is quite a complex issue of case law.