(Sweden situation). There's recurring inspections of any vehicle, binannually or something maybe for motorcycles. The HD people I know/knew, would change back to the stock pipes for inspection, because the loud ones were not legal to use. Then just change back again.
Had a friend who put an Akrapovic on his MT-07 - DB killer is welded but once you drill through a small part on the weld you can remove it/put it back easily and the drill hole is covered by carbon shield so unless they disassemble the shield to check (and my friend had it like this for 5 years before selling IIRC) it was just pull out - put it back in for technical
Generally, well designed bikes assume a certain pressure in the exhaust pipe and use it as a way to compute the internal combustion cycle timings, since it affects the movement of air and how long it stays and how fast it is likely to move on. So changing the pipes without doing anything indeed affects performance. That’s why most pipe changes usually also come with a reflash of the bike’s ECU so that the onboard computer can know new pipe’s air resistance parameters.
USA long-time motorcycle owner here: agree. I believe there have been laws on the books for many years regarding noise limits, but they are (effectively) NEVER enforced. No-muffler-at-all ("straight-pipe") exhausts on V-twin (EX: Harley Davidson and its countless clones) are de facto standard (and for reasons unclear to me are accepted).
Also, aftermarket exhaust systems for motorcycles (99.9% of these being much louder than stock/OEM) are a huge business: I'd guesstimate that 50% of motorcycles sold in the USA soon (< 1 year old) end up running aftermarket exhaust systems; it's a standard first modification done by almost all enthusiast owners.
Anecdotally I've heard that they are mostly used as a way to stop riced out Japanese cars.
Not ppl on motorcycles. As someone who has run straight pipes across two major cities never had an issue. A bunch of motorcyclists don't even have licenses lol.
The EPA prohibits modifying exhausts on motorcycles to exceed some decibel limit (80 something IIRC?), and this is stamped into the muffler on my motorcycle.