When I was in graduate school, I was somewhat involved in the process of hiring a few professors. Whoever we would have hired was probably going to get tenure and remain in the department for decades. Intangible personal and interpersonal aspects of the candidates were therefore about as important as the quality of their research, because nobody wants to be stuck working for 20 years with someone they don't feel comfortable with. Naturally, this has a tendency to perpetuate the gender and race imbalances in academia.