My first thought was firing a gun with so many people standing very close. LEO's have other non lethal means that could work on a dog.
Firing a gun without knowing your backstop is generally bad, but angled down and in self-defense it's not the worst thing in the world.
The dog in question was large and probably could've done some decent damage. It's not right what the officers did, but it wasn't unreasonable either once the animal went nuts.