Why does magnesium for #Mg^(2+)# cations and not #Mg^(6-)# anions?
Because magnesium is a metallic element that tends to loss electron to achieve stability.
Magnesium is under group 2 that also has a valence electron of 2. To achieve stability and to follow the octet rule, these 2 electrons in the outer shell will be removed making this atom into an ion with a 2+ charge.
Thus, magnesium has the ionic symbol of