In most jobs, there are plenty of ways to get fired even if you haven't broken any laws. This was just one of those ways, for one of those employees, at one of those jobs.
Sure, it's legal. What we're discussing is what justification there is to make it socially acceptable to fire or tell people to resign based on political views.
(Shrug) It's acceptable to me and to a bunch of other people, so that by definition makes it "socially acceptable." I reserve the right not to employ Nazi asshats, or to work for them. That's the upside to at-will employment... and the downside of being a Nazi asshat.
In most states, political beliefs do not, and should not, qualify employees for membership in protected classes. Under California law the situation is murkier, but most conservatives like Eich would agree with that sentiment, I'd hope. But then, the definitions of traditional terms like "conservative" are becoming hard to keep up with nowadays.
At-will employment goes both ways.