Who do the police work for?

People wonder why there is so much police distrust.
Those cops let off 20 shots because he was holding a cell phone.
Then stood there waiting for backup for 5+ minutes.
Then yelled over to the motionless body, asking if he could hear them.
Then finally gathered the courage to move up, and cuffed him while he bled out.
who, again, do these cops work for?