To be fair, I've thought at times, at a convenience store near us, the police "can" go sit at a counter and if someone had it in for them, I do think they could cause some damage.
This attack happened inside the precinct, so from my understanding, a male officer was killed, a female officer was killed and a staff worker and I guess the attacker themselves. One can catch people off-guard and the police should feel at least, somewhat safe inside the police department.