Rapunzel Hair in Real LifeHistorically, long hair has been a status symbol in many parts of the world. European nobles would do it up in elaborate headdresses and Japanese noble women in the Heian era would grow out their hair, sometimes for their entire lives, so it could become meters long, requiring special trains to be built into the clothing. As a result, long hair is considered a mark of high breeding, so many Ojous have long dark hair. Note that such people tend to also have servants who wash and comb their hair for them. There is even a theory that humans lost almost all their body hair while having the hair on the head grow much longer than in any other animal, exactly because of its function as a status symbol. Healthy long hair is an indicator of general good health and a lifestyle that allows taking good care of it. Both women and men with long hair would be regarded as the most prestigious and economically beneficial partners and since children of healthy and affluent parents would have the best chances to survive, evolution would naturally select for longer hair. It's basically the same thing as the bright feathers of tropical birds.
In the wake of the Industrial Revolution, long hair has become mostly exclusive to women, especiallyand ironicallyin the upper-class areas in which it used to occupy. Subcultures (such as hippies or metalheads) that do have the penchant for long-haired males will very likely have females react by growing their hair even longer, often to the point of qualifying for this trope.
Note that usually hair falls out after growing for about seven years; meters-long hair requires more than not cutting it, but also having the correct genes for long (that is, fast-growing) hair.