Back in the day, the IWW and other Unions made sure they had their own good squads at the ready.
Some trouble makers are undercover cops or paid informers, others may just be folks who want to throw a brick at a cop and figure they can get away in the crowd. The goon squad was there to make sure that no one gave the cops an excuse to start busting heads.
The police are always more prepared for violence than protesters. There are always elderly, infirm, or young children marching with us.