The real life "Case of the Shipwrecked Sailors" followed an incident that took place on the high seas in July 1884. The Queen vs Dudley and Stephens became the lawsuit concerning the cannibalism that took place after the men were adrift in a lifeboat without any gear, food, or water and decided to sacrifice one sailor for the lives of the others. They were later tried for murder.
The legal argument centered upon what is termed Murder by Necessity. For example, The George, a ship, sunk on a voyage from Quebec to Scotland in 1822. The Elizabeth Rashleigh sunk in 1835, and the Essex sunk in 1820. All these shipwrecks had people who survived because of cannibalism, and the survivors were pardoned for their crimes, because of the necessity of others to stay alive and because of an unwritten law, Custom of the Sea, that suggests what occurs at sea basically stays at sea. This unwritten law was thought to protect the survivors from prosecution.
In the Dudley and Stephens case, the two men were tried for murder even though they thought they would be protected under the Custom of the Sea. Upon conviction, the Queen later granted pardons, and the sentence became six months in prison, which they served.
The question then becomes what is necessity and does that necessity ever exist to kill someone and eat them to save your own life? From a moral standpoint I would suggest that Dudley and Stephens got off lightly, even though there are legal precedents to support their short prison terms or no prison term at all.
All things being considered, yes, the case should have been won by the Queen and was won, even though other survivors of shipwrecks have committed cannibalism. Perhaps more important moral questions should be asked: First, should there be different laws governing human behavior at sea rather than on land? And secondly, is cannibalism ever acceptable?