It may be wrong-headed, but (as many on this forum would certainly argue) employers are within their rights to employ or not employ who they choose, based on whatever criteria they like (except for race, religion, and apparently sexual orientation, now). Employees have the right to walk and look for work elsewhere.
That’s not to say I like it. I’m glad my employer doesn’t seem to take any interest in my life outside work.
In Europe they would take to the streets and riot if employers tried this sort of stuff, for the government to intervene and make it illegal. But we don’t want government interference with either our personal lives, or in business, right?
Again, thus my motto: “LUTFA!” (Leave us the F alone) If we need you, we’ll call you.