This is a power bank boost circuit with load sharing function. In the case of TP5400 or TP5410, the switch to the inductor turns off when charging. Thus when the 5V USB source is ORed with the battery, the 5V power will take over.
A diode is typically used to prevent power from going back to the 5V USB source, but we can use a comparator and a PMOS to form an ideal diode so little voltage is dropped across.