The alkaline chemicals present in the soap give rise to foam. But the physical reason is, the foam is just air bubbles. When you apply soap on hair, the minute air gaps facilitate to fill the foam with air to form more lather.
This is the reason for comparatively less lather when you apply soap on your body.
A more practical example for this phenomenon is the lather formation while you apply shaving cream to your chin by shaving brush with bristles like the hair.
The bristles with air gap fill the foam with air to form lather more easily than if you apply it by hand. The same is the case for the tooth paste which lathers more when applied with tooth brush with bristles than by bare hand.
Published in The Hindu on Feb 7, 2002.