Wearing headphones while driving is illegal in most places, as it should be. I personally think people biking while wearing headphones are unwise but at least they’re unlikely to hurt someone else while doing it.
I think the point is that you can buy a road legal vehicle where the driver is entirely encased in glass/steal with anywhere from 5-30 powered speakers to use at any volume they want but we still end up having these "people existing outside with headphones is bad because every piece of the earth has been handed to cars" arguments.
In most US states there are no restrictions to driving with headphones on. By my quick count only six states ban it, and a handful more say you have to have one ear uncovered.
Sadly it is in France, although not because driving while not being able to hear is bad (otherwise car radios would be banned), but because they wanted to ban it for cyclists and motorbikes.