I for the most part took your train of thought, until a my stepsons Navy Seal cousin explained their code of conduct and ethics to me in someone what of a lecture and history lesson, He also explained what security consequence of taking or displaying photos or even talking about your mission. So I guess I stood corrected by someone that has been there and swore the same oath. As far as a presidential pardon and firing a superior for doing what they were supposed to do that is not right. It might be his prerogative, but duty not buying it, just my opinion and that does not make me liberal or stupid.
I can maybe understand why it COULD be a security risk in this day of social media. BUT.........secretary Spencer was clearly out of line. As far as Trump issuing the pardon to Gallagher goes,Trump has Constitutional authority to do so and it is absolute. Concerning the order he gave to reinstate Gallagher's rank and trident..........that too is absolute as CinC.
If Spencer didn't agree with Trump's decision that's fine. He can either keep his mouth shut or resign. He was in clear violation of the chain of command.The Secretary of the Navy answers directly to the Secretary of Defense. Recall that SecDef is a cabinet level position and SecNav is an appointed position below ALL cabinet ranks.
For Spencer to go around SecDef and try to negotiate with some underling in the White House is clearly insubordinate and attempting to avoid the chain of command. It was right for Esper to fire him.