Employers would have to be pretty spiteful to look at it the way you purposed.
It's not always that black and white. In spite of appearances, many many companies make hiring decisions based on things other than what's in a resume.
For example, a company may have $mm contracts with another company whose owners/operators/shareholders/etc. favor one particular view, political party, or social construct. That company will most certainly look down upon the other company hiring people of a particular background.
Or the pressure could be internal. A couple of times in my life I've worked for companies where certain departments were unionized. Even if you weren't in one of those departments, if the company hired you and you had a particular background, the union would object.
It's not always that black and white. In spite of appearances, many many companies make hiring decisions based on things other than what's in a resume.
For example, a company may have $mm contracts with another company whose owners/operators/shareholders/etc. favor one particular view, political party, or social construct. That company will most certainly look down upon the other company hiring people of a particular background.
Or the pressure could be internal. A couple of times in my life I've worked for companies where certain departments were unionized. Even if you weren't in one of those departments, if the company hired you and you had a particular background, the union would object.
The real world is very complex.