In the Boston case, she wasn't "protesting", the event wasn't a "protest" at all if I remember correctly.
She was deliberately hanging around the fringes of a post-game mini-riot watching drunk idiots burn vehicles and actively fight with police.
Rather than just leave the scene of the riot like a smart, non-involved person would, which she had plenty of time and police warnings to do, she decided to stick around and watch the fun.
That incident happened after a Red Sox game about 4 years or so ago. After the game, a bunch of idiots were in the streets being rowdy. The police wanted to clear the streets. This was right outside the field (down the road from there someone lit a car on fire later on in the night during a mini riot). There wasn't any fighting or rioting at that particular spot where the girl was though. It was just a bunch of drunks yelling and not clearing the area fast enough. People were up on the beams and refusing to come down. The police ended up using pepper balls on the crowd. They weren't using them as intended, they were using them to "punish" people. One guy got hit at close range with something like 30 or so pepper balls. Since they were just firing them indiscriminately into the crowd (some at eye level)...a girl standing with her friends next to a vendor's cart got hit directly in the eye and died.
The police ended up saying that it was due to a "lack of training" and said they would discontinue their use of the pepper balls until the ordeal was sorted out. The Boston PD was seen with them and photographed only days later though. So the family sued the police and won. I think it was something like 4 million dollars they got in the settlement. My tax dollars well spent
Of course the people outside the park were being idiots and some if not most of them deserved to be arrested. The Boston PD's behavior wasn't much better though.