Tolkien is clear that while most Elves grew no facial hair, Cirdan the Shipwright had a beard. But he tells us little more than that the beard existed — we get (so far as I know) no explanation of its origin. Which means this is a topic for rampant speculative headcanons!
My theory starts from the premise that Elves aren’t entirely smooth-faced. A little downy fuzz is typical, and some — especially older men — can grow a few long, scraggly whiskers. For the most part, this hair would be treated as an embarrassing thing to be shaved off, since it couldn’t grow into a full beard of mustache.
Dwarves, meanwhile, are bearded, with thick, bushy hair on the faces of all genders. We know that when Elves first met Dwarves, the encounter was not friendly. Thinking themselves to be the only sentient race, the Elves hunted the Dwarves for sport. Only later did they realize that the Dwarves were adopted Children of Iluvatar. The Dwarves’ beards are an obvious point of difference with the Elves, and likely became a focus of racial stereotyping and disparagement. Perhaps Elves became extra-scrupulous about shaving once they came into contact with Dwarves, to distance themselves from this lesser and uglier folk.
Now let’s turn to Cirdan. From his actions throughout Tolkien’s writings, he seems to be humble, patient, and accepting of others. He minds his own business, but is committed to helping others (whether it be repelling a coastal attack against Hithlum, accepting refugees from all over Beleriand into the Havens of Sirion, passing his ring to Gandalf, or waiting for the last ship before coming to Valinor). It’s hard to imagine Cirdan engaging in Dwarf-hunting. I would guess he found it childish and embarrassing at best when the Dwarves were regarded as animals, and shocking once he knew their real origin.
Cirdan lived far from any Dwarven realms at first, but I see him as desiring friendship and being fascinated by Dwarven culture. Cirdan was, after all, a craftsman — and so he may have engaged in that sort of mutual admiration that can spring up between artists working in wildly different media. And as part of that, he set to growing his beard out. We don’t need to postulate that he was especially hirsute in his natural state, since he could doubtless cook up some Elvish Rogaine for his face. This wouldn’t be done in a cultural appropriation sort of way, either. I can envision him having long discussions with Dwarf emissaries about beard care, and journeying to Nogrod or Belegost to have his braids done by the top Dwarven stylists.
All of this would have paid off well after the end of the First Age, when his home base shifted to Lindon, right at the doorstep of the Dwarvish realms of the Blue Mountains. His beard could then stand as a symbol of Elf-Dwarf friendship that was uncommon in other parts of Middle-earth.
