What's the purpose of this diode in this level-shifter?
One purpose for that diode is to block a leakage current path if the +3VRUN rail is powered up but that the +5VRUN rail is not powered up. Allowing an unpowered rail to get leakage current from other powered circuits can lead to operational problems and potentially result in severe latch-up in circuits referenced to that rail when they become powered.