Also, why is/was it a thing?
This answer will violate subs rules, but my response is based on years of studying naval tactics, battles, etc. A ship captain was in total command of his ship, he was responsible for literally everything, the crew, the ship, the provisions, the training, the sailing, the navigation. Everything. So, if something went wrong, whether or not he had any control over the event (thinking storms here), he was responsible and would be held accountable. A captain who 'lost' a ship was branded and probably would never command again. A good example of this was the British naval tradition of court martialing any captain who lost his ship under any circumstances. His ship my have been attacked by a vastly superior force, he fought to the very last round of ammo, his ship sunk underneath him, but he would still be held responsible for the loss until proven otherwise. The stigma of loss was so strong that the only way a captain could retain his honour was to die with his ship.