Of course, not everybody hates cops, in fact, truth be told, probably most people are pretty much fine with police officers, and further, they believe them to be necessary and useful; but the thing is, there is a very significant percentage of citizens that do not care for cops and have some very strong justifications and rationality for having such a viewpoint. In point of fact, the main problem with police officers, is mottos such as "to protect and to serve" is an outright misrepresentation of what police officers actually are doing and accomplishing, which is especially demonstrated in areas of low-income, and minority demographics. In those areas, in particular, police officers are often not looked upon as part of protecting and serving that community, but more as a harassment vehicle, outright annoyance, and a definite danger.
So too, police officers, as a matter of course, when they protect and serve, clearly demonstrate their allegiance to the power structure within a given community, which is what creates the tension between certain groups of citizens that are fearful of the police, as opposed to those, that see the police as helping to maintain order, as well as providing strong security. In addition, police officers, are able for the most part, to stop and possibly even frisk any citizen at their discretion, without that citizen having much recourse to preclude such; which means that simply being out in the public for certain people, may open wide the door to harassment. So too, police officers are armed with lethal weapons, of which, the usage of such, is seldom successfully challenged in any court of law, so that, police officers appear to have an incredible amount of power, of taking freedom as well as someone's very life into their own hands, of which, those officers are almost always protected by the system from any legal or punitive retribution. Finally, too, police officers, issue tickets for all sorts of offenses, real and imagined, which cost constituents millions upon millions of dollars.
On the other hand, firemen are almost universally admired, for they truly do appear to not only "to protect and to serve", but have demonstrated time and time again, that they are only too willing to put their own lives in danger in order to protect property and to aid people. Additionally, firemen often serve the addition duty of being first responders to medical emergencies, on behalf of their constituents throughout the community. In short, one does not often find anyone that has much criticism of firemen, and indeed, there are many people that have a great deal of admiration and respect for firemen, because firemen perform their duties in a manner in which the people on the whole are truly appreciative of them.
Sure, no doubt, police officers and firemen perform different duties, but at the end of the day, both occupations are supported by the people's tax dollars and both occupations are supposed to be of true service to those same people. The problem with police officers is too often, they are used by authorities, whether they are political, civil, governmental, and prosecutorial or business authorities, as an instrument of force to keep certain people in their place, and even more so, to keep certain people oppressed.
In short, cops are hated because they are unfair, and firemen are admired because they are fair; and fairness, most definitely, matters.