Yes they are, and we loudly protest that this is wrong. But my argument against it has never been that it is, or ought to be, illegal.
For example, I may oppose the firing of a professor for teaching from a conservative perspective in a political science department. But I would not call for legislation to prevent such firings. Similarly, I may support the firing of Professor Jensen for his idiotic remarks. But I would not support legislation requiring his dismissal.
Private universities ought to be able to hire or fire whomever they choose (provided they live up to their contractual obligations of course). Public universities ought to have much the same latitude, only with direction provided by publically elected officials as well as university employees. Anyone ought to be able to call university officials good or bad names based on how they choose to exercise their hiring or firing power.