A big-honking stereo system isn't illegal to have at home or in a car in any jurisdiction I'm aware of, but there can be limits on how loudly it is used.
A stereo is a lot like a hammer in this way: Anyone can have a hammer. There's plenty of legal things a person can use a hammer for, and also plenty of illegal things as well. But the hammer itself, of any size, is A-OK.
There can even be time limits on when hammering is allowed[1].
[1]: I was involved in fire remediation after a friend's house burned. There was a lot of work to do, and we were working very late. The police showed up and politely told us that we'd need to keep it quiet until morning and suggested that they would find some way to make us quiet down if we didn't. We stopped hammering and tossing things into the dumpster at 11PM after that incident.
The overall picture is that a helmet’s thick material blocks high frequencies. But it exacerbates and amplifies low frequency sound and white noise. As well, a helmet confuses the ear’s capabilities for identifying direction of sound that’s incoming
If a helmet is helpful is a question of how fast the motorcycle is moving and what kinds of sounds the rider needs to hear.
It’s complicated, but wearing no helmet might be safer at low speeds because the driver is more aware. No helmet, is undoubtedly not safer at high speed because brains are fragile
Edit: a simple experiment for anyone is to put on a full size motorcycle helmet anywhere, and then you can understand how much your hearing is dampened by it. But I guess it’s probably no worse than the experience of someone driving a car, which is soundproof by design
There are certainly helmets that try to optimize for noise but there is no single one fix beyond ear plugs.
Riders need to use ear protection within the helmet unless they want to become deaf in the future, because of the wind noise.