Magnesium is found in water because it is washed from rocks and subsequently ends up in the water supply. Magnesium has many different purposes, and can get into water in many different ways. Magnesium is just one of the alkali earth metals which is responsible for water hardness.