The police are often part of the problem. They should simply decline to arrest anyone if no law has been broken. But instead they just mindlessly obey.
A substantial fraction of police think that the law is whatever they say it is, and that "contempt of cop" is the most heinous offense possible.