# Why are chlorides, sulfates, and bicarbonates of Ca and Mg solely responsible for the hardness of water?

When soap is dissolved in water - irrespective of the anion - $\ce{Ca^2+}$ and $\ce{Mg^2+}$ form precipitates. Why are just chlorides, sulfates, and bicarbonates the only specie considered as "hardness" in water?