In 2009, 48 cops were killed in the line of duty. There were roughly 750,000 cops employed - the estimates vary. Stopping a guy coming out of Costco isn’t exactly a high-risk proposition...it isn’t a drug bust, or home entry, or dealing with a bunch of drunks at a bar at 1:30 AM.
They had the option of doing it in a less crowded area, and didn’t need to be all prepped to shoot. They might even have started by asking a question - what a concept!
Getting into a shoot out in the middle of a crowd shows extremely poor judgment. Especially since the guy didn’t have the gun in his hand.