It's an interesting situation. Imagine our enemies looking at that situation and wondering the readiness of all our resources everywhere. This alone puts a lot of people in serious danger. On the other hand the Captain was backed into a corner and I am betting the higher ups either were not focused on the situation or under estimated it's seriousness. Maybe the letter the Capt wrote was desperate, but it seems he was doing his job, which was looking after his ship. I am pretty confident the Capt tried to get the attention of the big wigs before resorting to the letter. In any event, if he broke the chain of command he has to go, and I'm pretty sure he knew this when he sent the letter. In the military, turning out to be right is not a get out of jail card for breaking command. Our military is going to be tested in the days to come and we need solid chains of command.
The real bone head move (and who needs to be fired) is the Sec of the Navy and his "he is stupid" comments. Had they relieved the Capt's command and quietly desked him for a couple years all would be over and done. The navy gets a hero that through himself on a sword for his crew, and a Hollywood movie and all is forgotten.