"Tonsure" (the act of cutting the hair or shaving the head) after the death of an elder member of the family is a age-old Hindu custom. In Hinduism, the underlying concept is that hair is a symbolic offering to the gods, representing a real sacrifice of beauty, hence shaving your head shows your grief for the departed soul.