Explain how walking away from a man with a gun is not exactly a peace-loving move?
He could have been going to retrieve a gun in the car. He could have been going to the car to run down officers. He could have started a dangerous high-speed pursuit. Any number of life threatening things.
In society, a cop isn’t just a man, the cop has the authority and responsibility given to him by society to enforce social order, up to and including the use of lethal force to prevent felonies and apprehend felons. If you walk away from a cop against his expressed commands and put your hands where he can’t see them, then the cop reaches the point where he can’t be sure he’ll make it home if he doesn’t take the shot.