system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do the armed forces generally require men to wear a short haircut but allow the women to have a long haircut?
gpt
It used to be common for men and women to wear their hair long. The main exception to this was that soldiers would wear their hair short for hygiene reasons. (Lice aren't fun.)

In the 1910s, and again in the 1940s, we fought two major wars, where (pretty much) entire generations of men would go to the army and have their hair short. (In the UK, and much of Europe, we then had compulsory national service for a while afterwards to further make sure all men had short hair.) 

Around this time Hollywood emerged, and the short haired, war hero look became fashionable. 

Women didn't really join the army until much later. (They could, but not on equal terms, and certainly nowhere near the front line.) By the time women were working in the field the need to enforce short hair was gone, as general hygiene improved. 

As for why short hair on men was maintained: pure tradition. The army is very stuck in their ways.