Okay so—
This is Marineford, this is a battle the world is watching and freaking out over. Whitebeard's invading and everyone's nervous, Sengoku just screamed this man can destroy the world.
If your soldiers begin to abandon their posts and flee from battle, you are already at risk of losing. Nothing is more devastating for a military force than people turning to flee. Most casualties traditionally happen when the frontline breaks down and people are fleeing.
Sakazuki cannot have morale breaking down and people seeing any way out. The immediate execution was evil, extreme and fast tracked. He likely would have been executed in any 19th or 20th century military regardless.