I mean, Optimus has Megatron at gun point, if Hot Rod doesn't interfere, there's only two ways this goes down.
1. Optimus doesn't fire, Megatron shoots Optimus anyway, not making Optimus look good.
2. Optimus does take the shot and executes Megatron right then and there.
I suppose Hot Rod interfering was their way of not doing either of the two options.