Iconic seafarer beards became a trend to scare away pesky mermaids.
Mermaid, seeing a bald pirate: Zero threat…! Mermaid, seeing a hairy, bearded pirate: If I get too close their face tentacles will eat me…!
Most mermaids only grow short beards as not to scare baby mermaids (longer beards look like the tentacled mouths of hungry squids and octopuses).
Pirates use this innate fear to their advantage to protect themselves from mermaids, hence the iconic beards and hat:
I like how this is presented as factual information
I actually figured that a mermaid’s hair was an extremely specialized first dorsal fin.
If you look at the structure of a fin, it actually separates into sections. In some fish, these sections can get extra long, in the form of stiff spines or soft, flexible rays. You can see this most prominently in species like the lionfish:
It’s entirely possible that these structures could become longer and thinner over time and come to resemble a human hair, at least from a distance.
This opens up interesting possibilities such as:
Poisonous hair
Flaring out the hair-spines to scare off predators