Diesel engines are different from petrol engines. Petrol engines control their speed by changing how much air goes in using a throttle plate, while diesel engines change how much fuel is injected.
The reason diesels have a throttle body helps with Exhaust Gas Recirculation (EGR). This system takes some of the exhaust gases and puts them back into the engine, which lowers the temperature and makes the exhaust cleaner. The throttle body can close a bit to help suck those exhaust gases back in.
Another handy thing it does is help the engine shut down smoothly. When you turn off the engine, the throttle body closes and stops air from getting to the cylinders, preventing any shudders.
While less common, a closed throttle body can also sometimes help in an emergency if the engine starts accelerating uncontrollably because of too much fuel or say a turbo seal goes and it starts burning its own oil. It basically acts like a big "off" switch by cutting off the air. Not all diesel engines have these throttle bodies. They're usually only found in newer engines where it's important to have really good control over the engine to keep emissions low.