Humans are said to be living in the desire realm. We are driven by our desire and the ultimate desire is that of sexual desire. Hair in many cultures, including the Islam religion is considered the symbol of beauty that fuels sexual desire. Therefore, i believe shaving the hair is a method to remove a means to ignite sexual desire and protect us from breaking one of our 10 refuge vows.
Additionally, shaving also another method to removes the attachment we have towards our "I". This is a basic, tangible and powerful way to redirect our focus away from ourselves towards others, which is the fundamental of Dharma practice: benefitting all sentient beings. This can expand into equanimity because the person we separate most from other and cherish as most dear is the "I".
The wisdom, compassion and multitude of benefit every method taught in the Dharma never fail to awe me.