I do understand that, however the police are not an anonymous group, and people in the US at least, are constitutionally protected. To be clear, if you are a cop, and I walk by and take you picture, you have zero legal right to stop me, no right to demand my camera no right to detain me, no right to insist that I erase that photo, and no right to lay a hand on me, nor sieze my equipment, nor destroy my equipment. None.
What I as a photograher may do with that photo is however restricted by copyright and use laws. I can't sell it, without your permission (release needed). I can't usually display it without permission either. Journalistic needs are allowed, however I may be guilty of other offenses depending on how/if it's captioned.
If I cross the tape as it were, I am breaking various laws, however I can still photograph as long as there is no expectation of privacy. So, if there's 50,60+ people gathered around, I can take the picture. I can't follow him into the john however.
If I am interferring with an investigation, if I am compromising the scene, if I am accessing areas I shouldn't be, if I am getting in their face, shoving them, spitting on them and the like, I should be taken to task. If I choose to place myslf in the middle of a mob, I should expect possible damage due to the fluid nature of the event, and the fact that a cop can't be expected to take the time to check all my ID's while others are tossing rocks at him.
But, standing on the side taking photos of an event, is perfectly legal.