The circuit is drawn wrong with the P-chan MOSFET D and S connections reversed.
The idea here is that the P-MOSFET could be replaced with a schottky diode, but there would be a power loss due to the forward voltage drop of the series diode. To minimize the loss of switching over to battery, the P-MOSFET is turned on when the USB voltage is zero, but in this schematic that doesn't happen. The only explanation is the MOSFET has been shown connected incorrectly, reversed D and S. When the P-MOSFET is turned on, its low Rdson would present a much lower drop than a diode it replaces.