There are two public faces to every department anytime an officer-involved story hits the news.
The police chief is a slick salesperson to put the department in the best light and is accountable to the mayor / city council. The union leader is the slimy salesperson who always paints the suspect/chief/mayor in the worst possible light and who constantly repeats the refrain "the job is hard", "we are only human", "followed standard department procedure", etc. There are a number of notable union leaders who are detestable caricatures of cartoon villains.
They have a fiduciary responsibility to protect the union (the members and the dues). They are not accountable to or elected by the public (in their role as union leader).
That said, they don't have to be cartoonish villains, but frequently are because their role is to pull heartstrings for police officers, not for the civilian/victim in the narrative.