The name alkaline earth metals was given to magnesium, calcium, barium & strontium since their oxides were alkaline in nature and these oxide remained unaffected by heat or fire and existed in earth.
-
because their group is between the alkaline and earth metals and they show intermediary chemical properties