The answer to this is simple! With the rising population in the world, we had to figure out a way to lower greenhouse gasses in the atmosphere. The best way to do this is by cleaning up the exhaust that emerges from vehicles. The way that the diesel world decided to do this is with a two part cleaning procedure in the exhaust system, including a Diesel Particulate Filter (DPF) and Diesel Exhaust Fluid (DEF).
The exhaust leaves the engine and goes downstream to a DPF. There, the DPF cleans the black soot out of the exhaust. The exhaust leaves the DPF and heads downstream to the Selective Reduction Catalyst (SRC). This is where the DEF is introduced into the exhaust stream. The DEF fluid, which is 32.5% ammonia and the rest water, reacts with the heat of the exhaust, and the precious metals in the SRC. This reaction converts the Nitric Oxide to carbon dioxide and water. The carbon dioxide and water is now what comes out of the tailpipe of a diesel truck, instead of harmful greenhouse gasses.