> while the views that usually result in people being fired are fringe and, in a word, vile
That is not true, a large majority don't agree with many radical lefts views, but would still get fired if they voiced those opinions publicly.
For example, should trans people compete in sports of their chosen gender? Almost two thirds thinks that they shouldn't, but saying that will get you labelled anti-trans and fired from many jobs, even though you might support trans-rights completely in every other regard.
https://news.gallup.com/poll/350174/mixed-views-among-americ...
> It would be deeply unpopular and ineffective, but I don't see why it should be illegal.
It would be extremely effective as most business owners are right wing. They just don't do it because they don't care what their workers thinks, they care more about profits. But if they banded together and made this policy at every right wing owned business you would see huge consequences, as the workers can't really choose to go somewhere else.