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.
To add, in the Netherlands, known for it’s stellar bike infrastructure it’s exactly with actions like this that they reclaimed their cities from being purely car oriented.