Many times automakers are heavily involved in the process of drafting legislation like that. The Obama fuel economy standards for example were supported by pretty much every automaker:
Consumers will save $1.7 trillion at the pump, $8K per vehicle by 2025
obamawhitehouse.archives.gov
"President Obama today announced a historic agreement with thirteen major automakers to pursue the next phase in the Administration’s national vehicle program, increasing fuel economy to 54.5 miles per gallon for cars and light-duty trucks by Model Year 2025.
The President was joined by Ford, GM, Chrysler, BMW, Honda, Hyundai, Jaguar/Land Rover, Kia, Mazda, Mitsubishi, Nissan, Toyota and Volvo – which together account for over 90% of all vehicles sold in the United States – as well as the United Auto Workers (UAW), and the State of California, who were integral to developing this agreement."
Modifying or removing emissions components on engines has been illegal since the beginning of emissions standards with the Clean Air Act in the 70s. With one notable exception, the trend has been to tighten the standards through every political regime in the White House or Congress for the last 50 years. It's just that it wasn't enforced very well until VW cheated the system and highly visible coal rollers became prevalent. Now they're cracking down on everybody (gas or diesel) that makes or sells hardware or software capable of increasing emissions. The big companies all stopped a couple of years ago. Now they're cracking down on the ones that didn't get the message.
Trees are great. They provide all kinds of benefits, including consuming CO2. But again, there's a ton more that comes out of a tailpipe than CO2. Trees aren't going to do anything to reduce the impact of particulates. They can't clean up NOx and other smog forming compounds. When you delete a diesel, you're hurting anybody that breathes the air around it regardless of whatever amount of CO2 is emitted or cleaned up by trees.
A lot of times people seem to approach stuff like this with the expectation that a new alternative has to be perfect in order to be used. That's not true at all. It just has to be better than what is currently being done. Are the emissions systems perfect? Is DEF harmless? Of course not. But that doesn't mean that it's not a massive improvement compared to what was being done before. Progress almost never occurs all at once. It takes time and a thousand incremental improvements.