As far back as the first movie Prime was giving it the old "Freedom is the right of all sentient beings" before proceeding to blow away every Decepticon without a second thought.
Its just a terribly written, terribly conceived franchise. The fact it has been so popular says more about the audience than it does about Michael Bay as a director.
back in the old days, Optimus Prime would fight, yes. However he would still fight honorably, rarely if ever resorted to dirty tricks and never blasted any humans.
In the old cartoon that idiot human Sean Berger should have been blasted for his role in Megatron's scheme but Optimus Prime showed wisdom and restraint and left him to face human justice.
Frankly I think optimus prime's peace loving attitude is why the Decepticons conquered Cybertron by 2005 Earth time.