(The civil service is generally a noteworthy and fascinating exception to this rule, as it was learned early in America's history that there was little value gained in gutting the bureaucracy every time executive leadership changed hands. So, for example, the President's cabinet and some top positions are appointed and tend to rotate out upon change of Presidency, but most hired positions in the federal bureaucracy are protected from politically-motivated hiring or firing. But that protection is not extended to the private sector, with some state-specific exceptions. California is a notable exception to the rule, and whether Damore was fired for being conservative has come up. The possibility didn't sway the NLRB's ruling, apparently.
Whether one political point of view or another could make someone likelier to take actions that are in violation of federal employment law is left as an exercise for the reader ;) ).