Not only is it wrong, if it happens now, it's against the law and the company would be fined for it. It's discriminatory practice and contrary to popular belief, the laws are absolutely even-handed.
Time was some places - largely Labour Councils - did have "Positive Discrimination" guidelines and it was to try and address the fact that minorities - ethnic, gender, disability, whatever, were disadvantaged in most recruitment campaigns. They did have a guideline that said where two candidates were exactly matched, it was acceptable to take into consideration any minority status. Gormless idea - patronising to the candidate and of course, it gave rise to the whole "white boys finish last" routine.....
Nowadays, employers over a certain size are routinely audited on employment and they are asked to state the number of employees by gender, disability, age, ethnicity etc. If something is askew, like 984 blokes and 6 ladies, or nobody over the age of 35, then someone will check that recruiting practices are not discriminatory. Read the ads placed, look at CVs submitted, shortlists etc. It's all very low key.