The schematic isn't all that clear, but the battery positive terminal is connected directly to pin 3 of the LTC4054, before Q1. Q1 is oriented kinda backwards from its usual orientation as a switch. The body diode is actually forward biased toward the VOUT load, in the same direction as D2.
So when 5V is available at the USB connector, the voltage at VOUT, even after the Schottky D2 drop, will be higher than the maximum 4.2V coming out of pin 3. So the body diode will be reverse biased, and no current will flow backward to the battery. Q1 itself will be turned off because it's a P-channel MOSFET, and its gate will be at 5V, which is actually above its source voltage of about 4.5V. So when 5V is connected, the 5V source directly drives the load (VOUT), and the battery is isolated, and charges independently (also powered by the 5V source).
When USB is not connected, the gate of Q1 is pulled down to ground by the resistor, which turns on Q1, thus providing a very low drop path for the battery to supply VOUT.
This setup is needed in case you want to operate the DSO150 at the same time you are charging the battery. Without the D2/Q1 setup, the charging IC would have to provide current for both functions through its internal charging circuit. It might be able to do that, but the charging ICs normally terminate charging when the current drops below 10% of the full charging current. If the load is drawing significant current, charging may never terminate, and continuing to apply 4.2V to the battery after it is fully charged could damage it, and could even release smoke, or worse.
I did the lipo mod to my DSO150, and my charger circuit does not have this feature. So I have to remember to only charge the battery when the DSO150 itself is turned off.