The cartoons were not very violent, but the Marvel comics were often extremely brutal (decapitations, limbs being severed, etc). Even in the much darker realm of the comics, Prime keeps his morals.
In the various comics there is conflict between Optimus Prime and his rival, Grimlock, over how to fight the war. Grimlock basically thinks Prime is "soft".
The scene would have worked better if Ironhide shot the Decepticon behind Prime's back.