Calcium and magnesium ions (particularly calcium) negatively influence cleansing power of detergents, because these form nearly insoluble salts with soap. When the water lathers readily, it means these ions are in negligible concentration in the water.