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.
Where I live, critical mass is legal. Bikes can go on the street and we have a law that allows multiple vehicles that move as one to be treated like one vehicle.
Where is it legal to drive in the oncoming lane?
Depends on where you are.
In most places you can certainly drive in the oncoming lane to overtake things in your own lane or avoid obstacles. You wouldn’t do it if something was coming the other way though, unless you really like the taste of airbag.