There is NO tradition. It's a personal choice. I see many many men with long hair.
Probably because only men were allowed to be warriors in most societies. And you don't want the enemy grabbing your hair and pulling you onto their sword.
Dear Alex O Connor,
I did some poking around the Internet for your interesting Q...and hairstyles for both sexes have really cycled through the millennia. But hair has always had ceremonial, religious, social, combat significance just like headgear does.
Until recently in European history, elaborate hairstyles were a privilege of the nobility with long hair for both. Finally in the twentieth century the masses had more access to wealth and leisure.
For the men's short styles in the twentieth century, what makes sense to me is an article in the LA Times; that in 1926-7 the Yale rowing team started wearing buzz cuts aka CREW cuts, which then became associated with athleticism and vigor nationwide. And the no-nonsense masculine image was helped along when WWII soldiers wore buzz cuts to help control head lice in tight quarters.
From my own memory, it may have been the Beatles who really brought in longer styes for men; trendy rebellious counterculture - although even earlier, James Dean and Elvis Presley wore those 'bad-boy' pompadours.
Here is the 2014 version of a crew cut for men: