As I understand it, the reason for shaving has to do with the mitzvah of mikvah . You may already know that a married Jewish woman is required to immerse herself in a specially-gathered pool of water called a mikvah after her period. The reason for this is that the period is the shedding of an unfertilized egg, a potential life that will never be. Thus, the woman's body was associated with a small death, and water, which has the power to restore all life, renews her from this state. When a woman immerses in the mikvah , every part of her body must be covered by the water.
Hair has a tendency to float up, and it is hard to be certain that each strand of hair was covered.
Therefore, to be extra-careful, some women shave their hair, leaving no doubt that all parts of their bodies get submerged. Once again, this practice is not required by Jewish law, but many people think it is wise to be extra-careful.