As the source article describes, it has nothing to do with the First Amendment. The Secretary of Defense is conducting a political purge of the Pentagon. The administration has stated repeatedly and at length that they expect personal loyalty to Donald Trump from the entire federal government, and that they have the right to remove anyone who doesn't show that loyalty or won't do what he wants.