P-Channel MOSFET Flipped on Schematic
The FET comes with a "free" body diode (due to its construction) so it has to be connected this way. If it was the other way around, then current would flow through the body diode from VBUS (presumably +5V) into VBAT (it's a LiPo, so 4.2V max), which would overcharge the battery in an uncontrolled and probably spectacular way (ie, boom). 

In fact, the FET could be replaced with a diode, but that would cause more losses.

The FET itself doesn't care much whether it is wired in the "proper" way or not. In order to turn on a PMOS, the condition is not "Gate voltage has to be a threshold below source" but rather "Gate voltage has to be a threshold below source or drain". In this case, source and drain are functionally swapped but it will still work fine. TrenchFETs aren't symmetrical though, so most other properties like capacitance etc will not be swapped, which does not matter here.