If a person is committing a crime, or threatening to commit a crime, and the potential crime is serious, a gun can sometimes be the only answer. Guns intimidate and scare people in a way that, while not a good thing day to day, is certainly good when a crime is already in occurrence.
If civilians are allowed to have gun permits and lawfully carry concealed weapons then law enforcement must have the right to carry guns as well. If a crime is being committed and law enforcement or another bystander has their life in jeopardy then a gun is certainly an appropriate response to the crime at hand. It is law enforcements job to keep the community and themselves safe. There is no harm in the rightful use of a firearm when in dire need.