It was a mistake but not a big one IMO. The captain obviously did a good deed but through inappropriate channels and breached chain of command protocols. Likely knowingly, and probably in an attempt to make his superiors look bad. We are just watching office politics play out in prime time here.
Well, it seems like the acting Secretary of the Navy has been called to task now by someone. He has tendered his resignation after going to Guam and calling the Captain of the Theodore Roosevelt stupid and an idiot to the sailors on board the ship.
In my mind, there is a chain of command and above that morally, the duty to protect the military personnel who serve under you.