As much hay is made of "just following orders" being no excuse, one sees it made so often because it does work, depending on the context.
(In a sense, it even worked in the Nuremberg trials---basically everyone tried was executed, but the entirety of the German army and the civilian populace who supported the Nazi party were not, even though they, too, were "just following orders").
... but it makes for great legal cover.