The public isn't real good with cops. People really don't like being told what to do. An odd isolation from the community arises merely from being a cop. Perfectly innocent people feel guilty when a cop walks into the convenience store. They aren't unfriendly exactly, but they don't treat cops like normal people and are just as happy when they go away.
Kids act the same way when a teacher appears on the playground.
It spreads to social life. If your neighbor is a cop and your friend Joe occasionally smokes a joint, you have to manage things. The cop isn't out to arrest his next-doors, very likely drinks as much beer as anyone else, would rather just not know about the joint. But the awkwardness is there. And of course he wonders where to draw the line.