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.
Its illegal to ride on the pavement (or sidewalk) here in the UK (though tbh rarely enforced). Drivers pay “road tax” on their vehicles and a lot believe that pays for the cost of the roads. But it doesn’t. Residential and industrial roads are maintained by the local authority and paid for with council tax. Highways are covered by the Highways Agency and paid for by income tax.
It’s similar in the US. Most jurisdictions ban bicycles from the sidewalks in favor of pedestrians. Roads in towns/cities are paid for typically through property taxes. County roads, highways and freeways are funded through other taxes collected at the various levels.