I think the main question, as in why and how needs to be answered, the tank is an expansion tank, and as such should be filled to the mark as said, the pipe that comes from the thermostatic cap be it on a rad or the engine coolant pipework in this case, and goes into the expansion tank,
Its there to allow the cooling system to breath as such, if you heat water it will expand, so when the engine is switched off and the rad is no longer doing its job, the coolant will inevitably overheat via induction, this over pressures the system and the coolant is forced past the thermostat and into the expansion tank,
As the engine cools a partial vacuum occurs, and as the pipe from the cap thermostat is designed to allow coolant to be sucked back into the system, because this pipe is (should be) always below the coolant level in the tank, the problems arise when this expansion tank is allowed to go low or dry, which is why the OP is likely having trouble with air locks.