Scum is formed when soap reacts with calcium ions or magnesium ions.
The soap will not lather until all the calcium ions and magnesium ions have been reacted to form the scum.