Say you are comparing a 15w40 HDEO or Mixed fleet diesel oil, with a 10W-40 conventional passenger car oil.
The 15w40 "diesel" oil wins in a lot of things:
It will have stouter base stocks.
HTHS Viscosity is pretty much guaranteed to be higher ( viscosity at 300F )
They pretty much always have hig levels of ZDDP which is an additive used to prevent camshaft wear on old flat tappet engines.
It will probably have a Higher Total Base Number, which is the oil's ability to fight off acids.
It will probably have more detergents and dispersants which will keep the engine clean.
They require less Viscosity index improvers, which means the oil will maintain its viscosity for longer, and also VIIs create deposits when destroyed and form deposits inside the engine.
It will probably even be cheaper than a 10W-40 Passenger car oil!
Keep in mind oil companies have in mind that a 15w40 HDEO will be used in equipment that is worth sometimes hundreds of thousands of dollars, they cannot afford to have an engine failure caused by one of their oils, so they put a lot of effort into designing these oils.