The text between these diagrams offers one possible, but not entirely accurate explanation (IMHO).
The swapping of energies for low Z numbers arises from a repulsion between sigma(1) and sigma(2) when the energy difference between the atomic s and p orbitals is small.
When the atomic number (Z) is low (or more importantly the nuclear charge is low) the energy gap between the s and p orbitals is small. As Z increases the s orbital energy falls more rapidly than the p orbital one. The net effect is that the s-p energy gap increases as Z increases - this is shown on the diagrams. This reduces the repulsive interaction between sigma(1) and sigma(2) molecular orbitals, until at Z=7, and beyond, the expected "normal" ordering of molecular orbitals is observed.