Traditionally, long hair was always a symbol of masculinity. All of history's great warriors had long hair, from the Greeks (who wrote odes to their heroes' hair) to the Nordic, from the American Indians (famous for their long shiny hair) to the Japanese. And the longer and beautiful the hair was, the more manly the warrior was considered. Vikings flaunted their braids and samurai wore their long hair as a symbol of their honor (they cut their braid when they lose honor).
When a warrior was captured, his mane was cut to humiliate him, to take away his beauty. That custom resumed in what is today military service. There when new soldiers begin their training the first thing they do is cut their hair to undermine their self-esteem, make them submissive and make them see who's boss.
The Romans were the ones who "invented" short hair so to speak, between the 1st and 5th centuries AD.. In battles they believed this gave them defensive advantages, since their opponents couldn't grab them by the hair. This also helped them to recognize each other in the battlefield.
Short hair on men is a relatively new "invention" that has nothing to do with aesthetics.
But today we often see men being humiliated, sometimes called "gay" for wearing long hair, not knowing that short hair is actually the "anti-masculine" and is a repressive social imposition, while long hair symbolizes freedom.