To my understanding, when police officers die, it's usually not from being outgunned, but because someone got the jump on them (or accidentally hit them with a car). Of the 89 officers who died in 2019, 48 died from foul play and 41 died due to accidents. Of those 48, 34 of them were murdered with handguns, 7 with rifles, 1 with a shotgun, and 2 with firearms that weren't specifically reported.
So out of all 89 deaths, only 10 of them could conceivably be characterized as having been "outgunned". And that's not even to say that those 10 officers wouldn't have died if they had Armalites or whatever; it's possible they were just killed while they weren't looking.
A pistol is just a really good choice of gun for most law enforcement. They're not easy to steal, they're not to heavy, easy to store on their person, and quick to draw. Imagine a cop having to take a rifle off their back at a traffic stop if they saw a speeder pulling a handgun. They'd never get their shot off in time.
That's not to say there shouldn't be any law enforcement with long guns or SMGs; it's a fine concept in like, hostage situations and stuff. But it doesn't make sense for normal officers.