Magnesium has twelve electrons. The bands of the 1s, 2s, and 2p electrons split off there is a gap before the band containing the 3s electrons. The 3s electrons would be enough to fill the valence band but since the orange band and the green band overlap, the oragne band is mostly filled while the green band is mostly empty.
Plane wave method | DFT band structure |