Social norms.
Some cultures men had long hair historically.
Some Christian groups in history cut their hair short and went to men having clean shaven faces to differentiate themselves from the Jewish people or other groups.
For women long hair is sign of fertility and it’s associated with youth and sex. Many cultures make women cover their hair because the men supposedly can’t control themselves, or make the hair only allowed to be seen by their husband so it almost becomes sexual like breasts and vulvas. They have to cover their hair, but not cut it, because the men want to see it.