Yes, a popular diesel tuner was the target a take down and fined big money for providing tunes that make vehicles non-compliant. https://www.thedrive.com/news/another-diesel-tuner-nailed-wi...
Omitting wear and reliability concerns, some tunes gain their effect by not controlling for things like NoX and unburned hydrocarbons.
The worst offenders? "Coal rolling". It would be one thing to do this to help spool a turbo or for some other performance reason, but it's literally running the motor as rich as possible to dump unburned fuel out the tailpipe to make a visual effect. At the expense of everyone around you.