It does this because it is hydrophilic.
In water, the polymer unit loses the Na+ ion and so the polymer becomes
negatively charged as shown below.
A long polymer chain usually curls up into a ball when in solution. However, when the Hydrogen atom is lost, the negative charges on the polymer chain repel.
The water then is attracted to the negative charge and hydrogen bonding occurs. The polymer can absorb up to 300 times its own mass in water.
Three major uses for hydrogels are: disposable nappies, water crystals for plants and hair gel.