The Navy really screwed up on the Gallagher case, and it's pretty clear what happened.
Higher-ups and the lawyers involved got to close to this case. Maybe they believed that Gallagher's acquittal on all but the most minor charge was bogus, or due to perjury by fellow SEALs seeking to protect him, etc.. But once he was acquitted of all those other charges, they had to respect that acquittal, and should have treated him accordingly. Instead, they pretty clearly acted vindictively towards him (they didn't seek to strip to the Trident from anyone else in that photo), as a way to show that they "won" in the end even though Gallagher was acquitted of most charges. And that's simply wrong.
Trump was right to step in and stop it.