Detergents do not react with calcium and magnesium ions in hard water, so they do not form scum. This makes them more effective cleaners in areas with hard water.