It must be a hard thing, for a handler to make the decision Ape's partner had to. Law enforcement officials did not know where in the building the suspect was; apparently they tried to use a robot with a camera first, but there were mobility issues. Sending a dog against an armed suspect is not a fair fight, but I cannot believe that the intent was to risk the dog instead of a human. It a horrible situation, and Ape paid for it, in addition to the others the man had opened fire on the day before. Unfortunately, nobody seems to know why the suspect did what he did.
(not an image of Ape, as I don't own one, but a GSD from Wikimedia commons)