In this case, it's not the modification that is potentially illegal, but instead the noise that it can make.
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.