I don't know if they should be able to but in the USA at least can't you fire anyone for any reason as long as they aren't part of a protected class? I don't think there are any laws against political discrimination, are there?
[0] https://www.ncsl.org/research/labor-and-employment/discrimin...
[1] https://www.nolo.com/legal-encyclopedia/california-employmen...