Companies make hiring decisions based on all sorts of factors that have nothing to do with performance. Two extremely problematic ones are:
1) soft “skills” like charisma, rapport, etc, which are much more about social identity than social ability, and in particular discriminate against nonwhites, women, and many LGBT people
2) Unvarnished and criminal Klan-style racism, such as turning down a well-qualified job applicant because his name is Jamal, or assuming a black woman must have lied about her 3.9 GPA, which is still rampant in all 50 United States, and an enormous reason for the black-white wealth and income disparity. This sort of blatant discrimination has been repeatedly observed in the 21st century and is a plain fact.
These two practices are not only widespread and illegal, they also deprive companies of good talent. The reason for diversity quotas isn’t to distort a (nonexistent) meritocratic hiring process, but instead to correct grotesque violations in actually existing hiring practices.