At that time, the assailant already stated his purpose of killing as many police officers he could, and during his rampage he already had killed 5 police officers and gunned down dozen or so victims.
The assailant planned for this sort of attack for some time, he purposely took military training in private weekend warrior schools specifically to conduct the attack he was planning, and he even planned and mobilized himself to use explosives.
The assailant's plans were all suicide missions, and their goal was to inflict the most damage possible.
I'm not an american, and I live in a country where there isn't a single police-involved death for years, and even I am well aware that going with such a radical option was quite obviously the only way the police could ensure that the assailant would cease to be a threat to the public.