A much better way of handling this issue in CA is just to add a sound test when getting a smog check. Pretty much all cars get smogged and while it won't stop everyone, it will deter many from installing such systems.
Will not work. All 49 state legal mods come off before smog and go right back on after. Some exhausts have a removable insert in the tip that restricts flow but also dampers the noise. Also the penalty for modification when I got pulled over and hood popped back in high school was a $400 state referee ticket. I could take my car to a state ref to get signed off or pay the fine. The motor was swapped and 100% illegal per California of course I just paid. It's just lip service with a racket on top.
Quick edit: the swapped engine actually blew cleaner than the original engine before anyone chimes in there. If California cared about emissions they would only judge a car on what it blows out the tailpipe, not what is in it.
The issue is that people can just swap out an exhaust before the smog test. I only smogged my car once having lived there for 9 years. Maybe twice? But still, whoever has the skills to install an aftermarket exhaust also has the skill to reinstall it, probably.