At least in EU, discriminating based on political beliefs goes against art. 21 of the EU Charter of Fundamental Rights. Pardon my ignorance but, is that allowed in the US?
No, broadly speaking there are no national laws in the US agaisnt firing someone for their political views.
It is complicated but basically in the US, at the national level there are a few protected classes (age, gender religion, race, disablity) and you can’t make the decison to fire someone based on these reasons.
You can fire people for any other reason or no reason, so in practice this protection is limited and genreally favors the employer. Some US states have their own addtional labor protections.
You are correct, but I believe my fundamental conclusion is also correct. Simply put there are a few reasons you can’t fire someone and almost infinite number of reasons you can. California has more protections than others but the balance of power still overwhelmingly stays with the employer.
I believe that is allowed in some US states, because political affiliation is not a federally protected employment class, and some, but not all, states prohibit it.