Langsdorff was on a fools errand and paid the price.
Always easy to say in hindsight. He was the commander of a warship of a combatant nation at war and he encountered enemy warships. He did his job, which is all that any commanding officer is expected to do.
I should have posted this in my previous post, signatures of prisoners held aboard the Admiral Graf Spee, on display at the Museo Naval, Montevideo.