The keyboard/battery supplying 5V via the white cable connected to the CHIP's microUSB port (VBUS) is the primary power source and the blue battery is either being charged, a supplemental power source or the sole power source depending on condition of the keyboard/battery (VBUS) power source.
From AXP209 datasheet:
9.2 Power path management (IPS)
The AXP209 power input can come from lithium battery (BAT),USB VBUS Input, external power supply (ACIN). The IPS will select an appropriate power source depending on the battery and external power conditions.
O When only the battery is available, no external power input, the battery powers the system;
O When there is a valid external power source(VBUS Or ACIN), is is the preferred power supply.
O When the external power is removed, the IPS will seamlessly switch over to battery power.
O When both VBUS and ACIN are available, ACIN will be used to power the system and recharge the lithium battery;
O If the ACIN cannot provide sufficient current, VBUS is also connected to source more
O If the drive capacity is still insufficient, then the charge current is reduced to zero, the
battery is used to power the system.