The Supreme Court has ruled that the police have no duty to protect the public[0]. Worse, in that same decision, they ruled that states cannot impose a duty to protect the public on the police through legislation.
Since this case is about NYPD, it's worth mentioning the case of Lozito vs. NYC. There was a serial killer who went on 28-hour killing spree (four people died in total). The police were dispatched to a subway station in order to catch the suspect. When they arrived, the killer began stabbing Joseph Lozito. Instead of intervening to catch the serial killer that they had been specifically dispatched to apprehend, the police hid in a booth and let him stab Lozito. Lozito managed to disarm and incapacitate the killer, at which point the police decided to emerge from the booth and arrest the killer.
Lozito sued the NYPD. He lost because the SCOTUS ruling created binding precedent that police have no duty to protect the public.
> Now of course I'm sure that police presence has stopped many muggings
This is a common refrain, but research has consistently shown an extremely weak-to-nonexistent correlation between police presence and violent crime.
[0] https://www.nytimes.com/2005/06/28/politics/justices-rule-po...
I'm sure they occasionally use force to intervene in a crime, but it must be extremely rare versus just showing up with clipboards and a concerned look.