They are required by law to pass the Noise LEVEL TESTS IN SOME STATES...............
https://www.advrider.com/motorcycle-noise-limits-in-the-usa-and-canada/
As shipped from the factory, yes, they comply with the noise law.
After they’ve been modified either by the dealer or the owner, they no longer do, but there’s very little or no enforcement in most states.