Companies don't need to favor one group against another, they just need to make the process artificially hard, so they'll have the excuse that there are not enough workers ready to fill those positions.
The process is not artificially hard, imo. It's just testing you on things a college CS curriculum goes over. Sadly many many colleges in the US have a very substandard bar for teaching this subject.