I'll provide some additional food for thought.
I did some field research in Ch'an monasteries in Taiwan where I lived for some time, so I had time to interview monks and nuns and I brought this issue up. Here's the responses I got:
1) Shaving your hair and beard makes you impersonal.
2) Celibacy is made easier because man and woman lose their characteristic "look". As most Asians grow older, there's little that distinguishes man from woman if they keep shaving their hair and dress in the same robes.
3) The idea of Purity is reinforced since you have to keep shaving yourself.
4) Hygiene is more easily maintained. In a monastic setting, fleas could become a problem so shaving counteracts this issue.
5) Getting rid of Vanity. I am critical about this point because they will usually say that you have a strong attachment to your long hair and/or beard so that shaving symbolises an act of detachment. But then I ask: Isn't the act of continuously shaving your head an attachment as well? Reminds me of the issue of ritual versus awareness often mentioned in the C. transcripts.
6) Shaving and dressing in robes makes a clear distinction between laymen and monks. This is obviously a societal issue of differentiation whose cause is the need for support i.e. it makes the alms round easier because laymen revere the "signs of holiness"
This is Mahayana Buddhism. They're on purity trip which means that they're also Vegetarians(bad sign eh?). Curiously Chinese, Taiwanese, Korean and Vietnamese Monks(=Mahayana territory) are the only Buddhists who insist on being Vegetarian.
In India and neighboring countries, the opposite extreme is apparent.
Shaivites(particularly Nagas), in emulation of the traditional depiction of Shiva, wear extremely long
jata, which is basically matted hair/dreadlocks. The traditional explanation given is that these extremely long matted hairs are the seat for the
Siddhis, meaning supernatural power.
To give you an idea what this looks like, here are some images:
On the other side of the spectrum, you have the Jains who follow the custom of
kesha lochan during which they
pluck out the hair on their scalp and on their face. Ouch
Supposedly, it teaches them to endure pain. Coming from the religion which insists on
ahimsa, meaning non-violence. Bit ironic in that it doesn't seem to apply to how human beings treat themselves.
I should mention that there is a particular tradition, the Maha Siddhas of Oddiyana(probably prior to 8th Century CE), who formed much of what makes up Vajrayana Buddhism today. Traditionally, they had the same long hair(which they did not let become Dread locks, however) as the Shaivite Sadhus but they were also meat-eaters. It is likely that they smoked as well. This is an interesting clue.
So I think what happened is that there were various old traditions that may or may not have had a clue about why long hair may be linked with mind's potential and/or heightened sensory perception. These traditions stem from a time when there were no monasteries or any closed society. The moment monasteries came about, more down-to-earth customs were adopted to make life easier. These traditions may have become more and more dependent on society's welfare at that point and "signs of holiness" were adopted. The matted hair in India seems to be exclusive to specific sects of Sadhus and it causes a love-hate relationship with the village people in that they are scared by the notion that this hairstyle signals someone in possession of supernatural power, who can be a threat and also a source of help at the same time. Maybe it is far-fetched, but it could be a source for the name:
Dread locks.
Personally, I sport long hair and a beard, yet I think it is just a matter of personal preference and not necessarily tied to anything. It could well be that those with matted hair happened to practise something which did grant them something extraordinary but later generations mistook the hair itself for the source of such things. Similar to the analogy that a robe does not make someone holy.
Yet there is also the curious notion that most musicians, poets or anyone dealing with "sensitive" matters happens to at least have long hair. I mean I am a musician and most musicians I know are the only ones in western society that I know of that have "that hippy look".
Now for some parallels in Chinese Tradition. Up until the end of the Qin Dynasty, it was customary for most people to not cut any hair that grows on you. But there is no notion of dread locks. The traditional explanation is that you shouldn't waste what has been given to you by your parents.
It's probably one of many strange notions that remain in any ancient culture.
Besides hair, there's also a strange habit amongst earlier Taoist and Confucian scholars: Extremely long fingernails. I don't think they are linked to anything but the notion that this shows that you don't do any physical labor and are therefore of "higher standing" in society.
Nowadays, it is quite rare to see anyone with a beard and long hair in Taiwan or Mainland China. It's pretty much the same as in the West.
All in all, I think whatever true knowledge existed at one point in time was lost very quickly and replaced by cultural memory, directly leading to what we here would probably call "sacred cows".