Mattis is no longer SecDef and has not been for more than a year.
That doesn't mean the brass there still aren't more loyal to Mattis than they are to Trump. Mattis didn't hide his disdain for the President. Never did. The generals and admirals there knew Mattis when he was a serving officer and likely followed his lead.