A classic image of mermaids are their long flowing hair that swishes in the water. But in the scientifically realistic sense this makes none. The hair would be nothing more than a nuisance to the mermaid getting tangled on rocks and offering handles for potential predators, so why would mermaids evolve hair?
A mermaid that "realistically" evolved would look very different from the traditional mermaid in many ways. But let's assume that your mermaids do look like the classic type. Why do they have hair?
Option one: Sexual selection
Your mermaids evolved from a human-like species. The hair was so important to their mating process that it remained even as other body parts changed to adapt to the new environment.
Option two: Obfuscation
As other answers have elaborated, the "cloud of hair" might be able to hide the mermaids from predators.
Option three: Symbiosis
The mermaids cultivate some kind of ecosystem in their hair. Small fish hide in it, some plants grow in it. This could have a variety of uses:
- small fish help drive away parasites
- plants could improve the water quality around your mermaids
- they could act as a food source - the small fish attract bigger fish, which the mermaids eat
Option four: Mimicry
Your mermaids are very specialized predators that try to attract human sailors and feed on the content of their ships. Or, more realistically, they are parasitic on humans in some other way -- because evolution takes a long time, and ships are a relatively new invention. Either way, selection favored those mermaids that look like attractive women, and that includes the hair. Maybe mermaid society has different classes, like you get with ants, and most remain underwater while only the "man hunter" class grow hair.
When I think of real people with long hair under water, I think of a large cloud of hair.
That kind of obfuscation could be quite an advantage against any predator that likes to strike quickly and forcefully. For bonus points, the more mermaids there are, the bigger the cloud of hair. At this point, I'm thinking of zebras and the striped blur the herd appears as.
Another alternative to this is something land animals do; raise their hackles to appear larger and more threatening.
It makes more sense if we consider mermaids to be the origin for the siren legend.
In this legend sirens/mermaids called to sailors and fooled them into wrecking their boats on reefs or cliffs. Presumably, the sailors then become food for the mermaids.
In order for this deception to work, they have to look like beautiful women, and beautiful women have long hair. (At least, that is the easiest way to look beautiful from a distance)
Long hair is inherited from the common ancestors of humans and merpeople.
As whales evolved from an ancestor of the hippopotamus and manatees from an ancestor of the elephant, merpeople evolved from an ancestor of humans. Thus merpeople are a hominin species with aquatic adapted physiology and joined legs.
DJMethaneMan's answer to "Why would merfolk evolve arms?" suggests that a population of early hominins was forced to adapt to an aquatic lifestyle after being marooned on an island during deglaciation. This is reminiscent of the aquatic ape hypothesis promoted by Westenhöfer, Hardy, and Morgan, which proposes that humans' ancestors led a semiaquatic lifestyle. Humans have far less body hair than chimps, for example, and what hair they do have follows the flow of water over the body.
Taking the adaptation a step further are creatures in Scottish and Irish folklore known as selkies. On land, they appear human; in the sea, they wear sealskin swimsuits that men of the land tend to steal. Selkies have physiological adaptations akin to those of Michael Phelps and Gudlaugur Fridthorsson but can interbreed with humans. Merpeople have adaptations along similar lines but to an even greater extent, though like seals and dolphins, they'd still breathe air.
Occasionally humans are born with a limb difference called sirenomelia, in which both legs are fused into one hind limb. This limb has two femurs, four lower leg bones, and ten toes. In humans, it's associated with defects elsewhere, and few with with the condition survive infancy. (A photo of one survivor named Milagros Cerron can be seen as a transitional form between humans and merpeople.) But among merpeople, sirenomelia is normal and beneficial, as it eliminates turbulence between the legs when performing a dolphin kick. So over the generations, having what amounts to one thick leg became fixed in that population.
So if split legs were selected out of the population, why hasn't hair also been selected out? Other answers explain several reasons for retaining it, which I'll summarize:
- Sexual selection: Mermen still find long hair attractive. In fact, if long hair is as maladaptive as some claim, it may invoke the handicap principle in the same way as a peacock's tail feathers.
- Mimicry: Attracting human sailors in order to cause ships to wreck and then plunder the ship's supplies.
- Obfuscation: Disguising themselves in the water by creating a "cloud of hair".
- Symbiosis: Kelp hair decorations attract sources of protein.
- Providing raw material for fishing lines, nets, and other tools, with more tensile strength than steel.
- Shading the head and neck while hauled out on land.
Here's a better question, how does hair benefit anyone?
Hair has a variety of uses including indication, insulation, extension of touch, and in some cases protection(porcupine). I do not see why these qualities would not be applicable to water.
Oh and FYI hair is also a nuisance to human maidens.
hair can indicate gender and age
Ok, now for something completely different! (although the existing answers are good enough).
You think they have hair because that is what you have on your head, but for the merfolk is completely different. When the merfolk swin, the sea water passes through their hair. At that moment, the chemicals in their "hair" capture the floating ions/molecules of Berilium/Kripton/Astate/whateveryouwant who are essential to keeping the merfolk alive and healthy.
What is more difficult is how those captured elements go back into the merfolk body. Options:
Some kind of circulatory system. The issue is that this limits how fine a "hair" can be, because it must contain inner structures.
The merfolk regularly eat their own hair. I don't like it much, kinda of gross. Also it could behard to explain from an evolutionary point of view.
When in contact with other hairs or skin, the elements captured can be passed directly to other hairs or skin. So it would work like gas interchange in the lungs: hair touching the skin would lose its elements, after which they would get back some from other hairs that are not touching the skin, etc. That would favour merfolk having long hair.
If the merpeople's babies are relatively helpless or start as weak swimmers, head hair could remain as a useful point for the young to cling to as the adult swims around, keeping its arms free. This would be analogous to other ape young which cling to their mother's body.
For the purposes of worldbuilding, you could run with this idea without needing to excessively dirty up their hair with ecosystems of symbiotes nor tying their lifestyles to humans in any way.
I can't claim it as my idea, nor can I find where I first heard it, but it was definitely in the context of the aquatic ape hypothesis.
Maybe they craft nets and fishing line out of it?
I find it hard to imagine how a mermaid would evolve, I prefer the interpretation that they're something ancient wizards devised and just-so-happened to result in a viable species. They wouldn't be fast enough to catch fish directly and spears would only work until the fish evolved to be wary of anything spear-like, but a combination of spear-fishing, line-fishing and net-fishing would probably work well.
The crafting of hair-based tools would create a selective pressure in favour of mermaids having hair that grows long, quickly, silky and strong. It would be interesting if only the mermaids have long hair and the mermen are bald as having a full head of long hair could be seen as a status symbol.
Though maybe not the best solution, Depending on the environment, the Hair might just not be enough of a menace to be evolved away. Humans have advanced to such a degree that even heavily disadvantaged, we can still thrive. If the reasons to not have hair are simply for Speed and such, then if they with hair already move faster than they ever need to, there is no reason why it would disappear.
Though I cant list off anything with certainty, Humans definitely have Disadvantageous Genes and traits which get passed on anyway, because a man born without legs can still get around and live a very fulfilling life using only his arms and a wheelchair. Technology and being the dominant species overcomes many of the minor evolutionary disadvantages to the point where they still exist even today. People with Dwarfism can still have kids who also have Dwarfism. Merfolk could be in the same situation.
Hair doesn't help humans either. We've evolved lack of hair on most of our body (for various disputed influences). Hair on the rest of our body may be a carry-over, and/or may have a sexual-preference element.
If you want something more concrete, perhaps their hair isn't hair at all. The big problem for mammals underwater is how to breathe. If mermaids aren't mammals at all, perhaps their "hair" is actually external gill filaments.
The two most likely ancestors of an aquatic organism with hominid characteristics would be a fish-like creature or a hominid-like creature. The second pathway is probably your best bet. The aquatic ape hypothesis proposed by Hardy (and popularised by Elaine Morgan, with an earlier more fanciful version proposed by Westenhöfer) suggests that the ancestors of humans spent a period adapting to a semi-aquatic lifestyle before returning to a fully terrestrial one. This has been proposed to account for various traits including bipedalism and the pattern of hair reduction seen in humans. Many mammals which have adapted to partially aquatic lifestyles have lost hair. From memory (it's been a long time since I read it), Elaine Morgan suggested that head hair could have been retained to protect the head and shounders from UV radiation, since if you're standing up those are the parts that will get most exposure. Mammals which have adapted to a fully-aquatic lifestyle have mostly then lost their back legs (whales, dolphins).
So in your world let's say at some point between 20Mya and 200kya hominids started adapting to swamp or coastal environments. After a while one population returned to land; another went fully aquatic. Explaining the retention of long hair from that point on is tricky, but secondary sexual characteristics are often under strong selective pressure even if they're not helpful for survival, or for a slightly more sinister explanation your merfolk could use their upper body appearance to lure their terrestrial relatives into deep water where they are likely to drown or are vulnerable to attack.
There are some pretty strong (and valid) criticisms of the AAH out there, but as a fictional device it's plausible enough.
Let's think about it in a different way. What if the Merpeople have what look like hair if you compare them to humans, but actually function as biological sensing organs. For example, they could be extremely sensitive to movement, allowing a merperson to feel in intricate details the movement of the water, allowing them to hunt prey more effectively or move easier.
It just looks like hair; those are actually tentacles. Merfolk are not descended from fish or mammals, but are a type of Cnidarians, who use stingers in their tentacles to stun and kill prey.
Ask yourself, why do humans have hair? Some ancestor of ours lost most of the hair on its body-- and men sometimes go bald. So why do humans have hair? It's probably because of sexual selection.
Many swimming and sea-going mammals such as beavers, sea otters and seals have maintained their fur. Maybe a mammalian mermaid would keep hair on its head, like modern humans have?
Same reason whales do.
They had it before becoming marine, and the short hairs adapt to improve hydrodynamics (something about surface turbulance or detachment of laminar flow).
I think seals are better than whales for mer-folk, in terms of using the legs. Why do seals have a full coat of fur?
In a fictional world with merfolk, the hair could not be a part of their body at all, but some kind of algae or other organism that would look like hair to a human or humanoid observer from another species. The symbiote would simply prefer to attach to the merfolk's head and not other body parts due to one motive or another.
Bonus saddistic points if the symbiotes in question are coelenterata (i.e.: related to jellyfish). That mermaid looks so beautiful and gorgeous, let me fondle her hair... Seriously, though, this would add some level of protection against predators. Think of hermit crabs and anemones. Except the anemone looks like a wig and hermit crab is a half-mammal-half-fish creature.
Other than for hiding,sexual selection ,make the merfolk look bigger or making people think they are humans
Filtring plankton is an option too. The hair could also mimic some plants to trap the fish who eats them. could also work as glands capable to produce substances that could be disturbing for predators.
Merpeople are mythical creatures, a figment of humans' imagination. Hence they will have hair if that is how they are imagined, regardless of how much scientific sense that makes. Traditionally the people imagining merpeople were simple seamen with little inclination to scientific validation of their imagination. Hence they imagined merpeople to be in the image of normal people, a construct familiar to them. In some science fiction works (and no I can't cite any right now), merpeople were imagined by writers more inclined to scientific principles, and in many such instances these imagined merpeople are distinctly different from human beings, in hair and most other bodily features.