Why attribute malice to people at these companies when it is possible that all the challenges and disadvantages minorities and women have to surpass, in the end, result in those groups not coming up at the top, with the ultimate sorting function being the hiring process?
I see getting hired as the last stage in the pipeline, with the first stages being your family, then your education and then employment.
The more things go wrong in the first stages, the less likely it is for one to succeed at getting to the top of the next stage.
If people from underprivileged families can only afford to go to the 50% best school in the state, then to the 75% best college, then by the time they enter the job search page, they won't be at the top of the list (again, on average).
I'll use myself as an example: I had the privilege of coding for entire weekends when I was young, while my peers had to work the land. This gave me a distinct advantage early on, which I capitalized on, so at an interview with a company I am more likely to get hired than if those same peers had hypothetically applied, again because it wouldn't make sense for a company to pass on the best candidate when they are all competing for talent, regardless of race, gender, height or other ways of splitting people into groups.
I think everyone agrees that the current situation when it comes to diversity in the workplace is not acceptable, and we should definitely fix it, but in my opinion, if companies are competing fairly for talent, then that part of the pipeline doesn't really need fixing. We can instead use it as a test to see if the attempts at fixing the earlier stages result in better numbers.
P.S. This a difficult subject and I don't intend to offend anyone. Despite my relative privilege above, compared to my peers in the US, I still grew up in a poor and underprivileged family and am behind my current peers both financially and socially, so it's a topic that hits home for me.