While I sympathize with the captain, he knew that his actions would threaten the command of his ship. I'm willing to accept that he did this for his crew with the understanding that he would have to pay the piper as it were. After all, he had spent most of his adult life in the Navy and therefore knew what would happen if he bypassed his chain-of-command, for whatever reason, even if to civilians, it might appear to be justified.
Being the captain, he's responsible for everything that happens on his ship, including the health and welfare of his crew. It would be no different than if he had been off duty, asleep in his cabin and a 20 year old seaman manning the helm had made a mistake in the heading of the ship, causing it to run aground. The captain would be relieved of command in that situation as well.
Also note, that Capt. Crozier is not being discharged from the Navy, bur rather, just relieved of his command. Granted, his career is over, and he will probably be allowed to retain his rank and retire with his pension intact.

OCU