I was reading about why detergents do not form scum with hard water but soaps do, and according to wikepedia it has to do something with electrostatic interaction of sulfonates( most commonly) with ions present in hard water
These substances are usually alkylbenzene sulfonates, a family of compounds that are similar to soap but are more soluble in hard water, because the polar sulfonate (of detergents) is less likely than the polar carboxylate (of soap) to bind to calcium and other ions found in hard water.
https://en.wikipedia.org/wiki/Detergent
I am not able to find any reason for this anywhere?
According to me it has to do something with Lattice energy and size of sulfonate and carboxylate as sulfonate is a big ion relatively so it has less lattice interaction with ions like calcium and sodium, but i am not sure about it