Many Hindus who visit Tirumala Venkateswara temple in Tirupati get their head tonsured and offer their hair to Lord Venkateswara. Why is this tradition followed? Why is it only followed in Venkateswara temple and not other temples?
A small but popular story is there for this.
When Lord Sri Venkateshawara (MahaVishnu/Balaji) was inside the snake-antHill on Tirumala , one sacred cow is to come and give milk to the Lord daily (Brahma took the form as sacred cow), When a cow-herd man at once saw the sacred-cow pouring milk in the snake-ant Hill, he became angry and without understanding the truth, the Cow-herd man took the axe and has hit the cow on the cow’s head with the axe. The Supreme Lord Sri Venkatesha(Vishnu) who was present inside the snake-antHill received the hurt of the axe on his head from the cow-herd man instead of Cow getting hurt. When Lord received the hurt of the Axe on his head, the portion of his hair on his head disappeared due to hurt by the axe. When mother Neela Devi saw Lord being hurt on his head, she immediately removed the hair from her head and placed on the Lord’s head in the portion where the lord was hurt. Immediately Lord became well and Lord’s hair reappeared as beautiful as before he was hurt. Lord Venkatesha(Vishnu) knowing that hair is one of the beautiful features of women, Lord Sri Venkatesha promised that his devotees will shave Hair of their head (tonsure) and dedicate their hair to her. Neela Devi accepts the hair sacrificed by Devotees of Lord Venkatesha(Vishnu) and Lord blesses his devotees who sacrifice their hair for the sake of the Lord. This is the reason why Devotees tonsure or shave their head in Tirumala.
There are also Spiritual reasons: Tonsure or Shaving hair as offering for Lord represents a real sacrifice of material beauty and giving up false-ego in the way of shaving their hair as the sacrifice to please Supreme Lord.
There is a verse in Dharma Sindhu and also possibly in some other Puranas:
tIrthopavAsa kartavya sirasomundanAnicha sirogatAni pApAni yAntimandanatho yatah
What it means is whenever one goes on a pilgrimage, be it to a temple, a river or any other sacred place, they should clean-shave their heads because for everyone their 'pāpa' is attached to the hair. Symbolically, by getting rid of your hair, you are getting rid of your pāpa or sins and become eligible to visit that pilgrimage site.
This is also the reason why a son should clean-shave his head, get rid of his sins, and is then qualified to perform the funeral rights or Śrāddha on the death of a parent.
All the above is explained in this YouTube video (Telugu) of the program 'Dharma Sandehalu' which aired on Bhakthi TV channel.
It's possible that over the years, people forgot the original underlying reason behind this tradition and now do it for other reasons.