In ancient India (or the region that is now known as India) there were many customs, and there still is, relating to ones hair as a a sign of religious practice. Traditionally both men and women were known to keep their hair fairly long, men of high status wore hair at least shoulder length and women, significantly longer. Well kept long hair was seen as attractive, desirous and symbols of status.
For those more religiously inclined, there came about a separation in the form of the way hair was worn. For example, if you chose to live an ascetic life-style, most probably you would grow your hair long into dreadlocks, using the sap from certain medicinal trees as the bonding agent which is a practice that is still alive in India and the surrounding regions to this day. This actually showed a complete and utter abandonment of societal life. Therefore these types of practitioners were no longer considered with the social sphere, were left alone to live in the jungle or around holy sites, they had no contact with society as they had a deep disdain for anything social. This way of live eventually evolved into communities in the woodland areas, and the setup up of what are now commonly referred to as 'Ashrams.' Actually it's quite ironic, for a group of people who tried to escape society they have actually developed a complicated hierarchical structure of living. Most commonly called a "Sadhu", these practitioners' practice involved things that were outside of the accepted range of religious practice - meditation while sitting on corpses, cannibalism (usually from un-cremated carcases, though there are reported cases of homicide), overt sexual practices, etc.
On the other side of the coin, for those who were religiously inclined but opted to live within the boundaries of social life, there developed a tradition of shaving one's head, apart from a small tuft (that grew longer with age) at the central-back part of the head. There is a theory in traditional Indian practice that once intelligence resides in this part of the head, so it is a sign that you try to progress spiritually through study, logic and reason, rather than the more esoteric, or dare I say outlandish practices of the aforementioned sadhus. These were usually of the Brahmin castes, were well educated and provided to the religious needs of the populous.
There was yet another system, that of a complete shaved head, in these traditions it was a sign of renunciation from societal life but in a way more acceptable to the social populous that they relied on as they were more likely than not spiritual beggars or Bikkshu (the term can also be applied to non-buddhists with similar practices).
And I've realized that I am rambling on way too much and have gone somewhat off topic, so i'm going to stop here.