It's important to use magnesium alongside calcium in reef tanks since they help to retain the alkalinity balance together. Calcium is often needed in heavy doses to cater to the calcium carbonate structures of coral reefs. However, high levels of calcium will actually lower the alkalinity of the water itself - which will prove to be harmful to other aquatic beings in the tank over time. Lower levels of magnesium also contribute to the aforementioned disturbances. Hence, it's important to maintain a healthy ratio of magnesium alongside calcium to ensure proper alkalinity levels throughout the tank.