You have a pile of resumes and you discriminate between the candidates during the selection process. This happens on a number of different criteria.
The criteria that we should not discriminate on are sex and race.
Anyone that doesn't agree with this is out of the mainstream.
The issue is that if you cannot discriminate on sex and race, and 90% (made up number) of your qualified candidates are men that are asian or white, then 90% of your workforce will be men that are asian or white.
So, then you have to make hard choices, guided by the current laws, and a desire to create a corporate culture.
If more than 50% of your users are women but only 10% (again, made up number) of your employees are women. AND you can legally choose a qualified woman over a qualified man. Then you have a good reason to hire the qualified woman over the qualified man.
TLDR; discrimination is part-and-parcel of the hiring process. discrimination on the basis of sex or race could be a legal and accepted thing for a company to do. discriminating on the basis of sex or race for bad reasons is bad.