one, more nuanced, sentiment is something more like "all cops are bastards as long as bad cops are protected."
another sentiment is "modern police institutions are directly descended from slavecatchers and strikebreakers; thus, all of policing is rooted in bastard behavior, therefore: all cops are bastards".
there are plenty of other ways to interpret the phrase. "acab" is shorthand for a lot of legitimate grievances.