The reality is that almost all hiring boils down to trying to choose the best candidate, from a shortlist of candidates all of whom have an equal probability of being the best.
HR departments hate to admit it, but picking the best candidate is impossible. You can weed out the people who are very obviously unsuitable, but having done that, the opportunity to optimise the final choice is gone.
All you can do to pick between apparently equally skilled candidates is cross your fingers and hope that the one you finally favour is as good at doing whatever role your are hiring for, as they are at bullshitting their way through a hiring process - a pair of disparate skills that are rarely correlated in any way.
What usually happens, consciously or unconsciously, is that people hire people who are most like themselves. Which is a big obstacle for anyone who's not much like the typical company owner or senior manager.
If you get to the point where it's a choice between you and one other person, the question of which is the better person for the job is utterly meaningless. The issue then is whether the arbitrary decision between you is made on a purely random basis (which is fair and reasonable), or on the basis of an irrelevant characteristic such as skin colour, ethnicity, sexual preference, gender, age, etc., etc., (which isn't fair or reasonable).
And when we see that most successful applicants from this very small pool of otherwise indistinguishable, fully qualified, applicants are male, white, heterosexual, etc., then despite Loren Pechtel's protestations to the contrary, we can be sure that disparities of outcome are indicative of unreasonable discrimination.