Why is it that mean tend to keep hair short while women are expected to wear it long?
It depends on where/when we are. Because that wasn’t always the case.
In Renaissance Europe, especially during and after the reign of Louis XIII up to the French Revolution, long hair was a masculine/upper class (Cavalier) style. Conversely and relative, short hair was common among tradesmen and apprentices (Roundheads!) for practical reasons, and among many lower class people for hygenic reasons. Here and then to have long hair was to project an air of status and refinement: I’m so wealthy that I don’t have to perform manual labour and stay out of filth so I can grow this long luxurious mane, or at least I have enough money to buy a wig to look that way at least some of the time.
So you can see this is actually a recent trend, Men and Women used to both equally grow their hair out- the Chinese and most Aristocracies that carry on traditions from long ago typically all wore their hair long and in braids and when they went bald or the like, wore wigs and hats designed to replace the lost hair.
The prevalence of the short haircut for men is likely from the rise of the working middle class- long hair on the job can be problematic, it gets into food, it can blind the eyes, and so hair cut short out of necessity became common, and then the fashion, and then worked it’s way around.
Long hair is for both men and women a sign of virility and youth. We can tell a lot about a person’s age and health by their untreated hair, which is why haircare products are a multimillion dollar business. This extends to beards, which when grown long simulate the health and virility of a full mane of hair.
The reason for why a bald woman might still prove quite attractive (aside from being physically very, very attractive) is that because of hair-care products, wigs, and modern fashion faking virility and health, the mind has kinda evolved to look past/ignore certain signs aspects about women and men because they are no longer helpful- that fifty something woman looks late twenties, but has colored hair, makeup, and possibly surgery.
We may instead now look directly at clothing and mannerisms a bit more to determine age, as well as physical fitness- in places like Japan where hair dyes, wigs, and makeup are very prevalent, people are more associated with by their style of dress and “scene” than our Twenty-something, Middle-Age, and Senior lablels.