This was a Critical Mass event, which is why the bicyclists are taking up all of the street as a way to reclaim the streets and protest the lack of safety for riders under usual conditions. It’s not legal, but protests are never useful if they’re fully legal now, are they.
Parades close down the street with barricades/detours and such so cars don’t have the option to dangerously drive at them.
By law they don’t have that option either.