One part of this issue is that regulations to require expensive emission control systems work for OEMs, but they are much harder to apply to an individual with a truck at >200,000 miles. The regulations are designed for new vehicles, and the components in those new vehicles are designed to last for 10 years or 100,000 miles. It's one thing to roll the costs of installation and purchasing these particulate filters and catalytic converters onto the OEM (who gets to install them on new, clean steel with working fasteners) and another thing entirely to ask it to be done two or three times on the same vehicle.
An advantage of a diesel truck is that the engine may last for 300,000 miles, but if you're looking at a bill of $5,000 on a truck that's only worth $5,000, and you already have a welder...that particulate filter, EGR cooler, catalytic converter, etc. are awfully hard to justify compared to a big steel pipe.
I just helped my brother install a 'bypass kit' for offroad use on his 2009 Toyota Sequoia (which has a 5.7L gas engine). The 'smog pump' valves are known to be failure points - Toyota got sued over the 2005-2007 engines and recategorized the system into the powertrain to extend the warranty. The system costs almost $3,000 to repair, because you need to remove the entire intake to get at the valves. This system only exists to pass OEM emissions tests - specifically, while the engine is completely cold, the first 60 seconds of exhaust contains methane slightly in excess of the legal limit. The programming only cycles the valves once, for only 60 seconds, only when it's been more than 7 hours since the last start-up, only when the engine is cold, only when the ambient temperature is under 5 degrees C. The bypass kit removes this problem, it just lies to the engine and tells it that the temperature is above the threshold.
It's June; none of these things applied when he, his wife, and his 4 kids under 4 were stuck in the humidity and sun with the truck in limp-home mode trying to pull their camper home because the 12-year old system with 180,000 miles on it freaked out while leaving the gas station.
I wish that we could have repaired the system to work properly. I don't want to emit excess methane, neither does he! But there's no calculus in which spending either $3,000 on that vehicle or spending $600 on parts and taking 3 days off work to replace them ourselves makes sense for those 60 seconds of recirculation on cold winter mornings. What do you want him to do, buy a new $60,000 truck off the dealership and send the old one to the junkyard? I'm pretty confident that would be a lot worse for the environment than keeping the old one going another 6 years.
The problem is that Toyota has no incentive to care that these limited-lifetime components are inaccessible because they're off the hook after the truck is out of warranty.