There seems to be a lot of confusion on how this circuit works. I'm a newbie with C and C++ but do know my analog circuits.
Say the board is a 3.3V Pro Micro. This means the jumper, SJ1 is open. The voltage regulator can work with as little as 0.5V between input and output. This means that as long as the input is above 3.3+0.5 = 3.8V, you will get 3.3V out. At high current, the voltage drop across the diode, D2, could get up to 0.8V.
The voltage from the USB (UVCC) is nominally 5V. The fuse, F1, will drop some voltage but since this board does work, that drop is not enough to drop the voltage at the regulator's input below 3.8V.
Now, if we connect a voltage source to RAW greater than 3.8V, it will directly power the regulator. However, given a UVCC of 5V and a diode drop of 0.65V (smaller drop at lower current), a RAW voltage less than 5 - 0.65 = 4.35V would cause diode D2 to be on and some of the USB current might flow back into RAW or force RAW's voltage to rise up. With a RAW voltage greater than 5V, the diode will be off and UVCC will be isolated from RAW. Without the diode, The RAW voltage would feed into the USB and could blow up the PC's interface circuit.
Next, consider a 5V Pro Micro. SJ1 is closed. This means that the voltage coming from the USB is fed through the fuse and directly to Vcc. No need to regulate it down to 5V because we come in with the correct level.
Apply a voltage source to RAW greater than 5V and the diode will be off. So the same isolation between RAW and UVCC is achieved.
Note that with the jumper shorted, the diode does nothing (good). It is likely in there to keep manufacturing simple. By only changing out the voltage regulator and processor, we go from 3.3V to 5V boards.
There is one downside to the diode in the case of a 5V Pro Micro. Say I have other circuits drawing power from RAW. When I want to program the board, I want to just plug in the USB and not bother with supplying RAW power. But with just the USB supplying 5V, I will get a current flow through the diode and OUT the RAW wire. This can drag down the USB voltage enough to shut down the processor.
In my application using a 5V Pro Micro, I have the above problem. My plan to remove the diode. One way to do this is to use a current limited power supply. Connect the positive output to Vcc and the negative output to RAW. This will pass current only through the diode. I will raise the current until the diode gets hot and desolders itself. Then I will just lift it up to remove the device from the circuit board.