The beard is an example of pubic hair, ie it grows during puberty along with hair beneath the arms and on the crotch of both sexes. I undertsand that the latter two examples of pubic hair grow in those locations because they are close to areas that produce pheronomes, scents which in antiquity would have attracted a mate. These hairs trapped these scents and kept you smelling musky and appealing for longer.
Why we have not begun to lose the pubic hair on our crotch and under our arms since the advent of humans being repulsed by body odour is pondersome enough - surely, for a long, long time now, stinky men and women would be less likely to find a mate and procreate, so the tendency of hair in those zones should be being bred out - but why ever do men have a beard?
It does not grow in a scent producing zone.
Why have women, who must once, aeons ago, have had them, lost them?
It cannot have been preserved in men because it was a flag to women to show men had reached sexual maturity. Sexual urges are often felt before a person is fertile anyway, so the desire to mate is there before the beard. Also, a quick glance at a naked man's groin and underarm would have told a woman much the same thing.
Was it purely decorative, like a lion's mane or peacock's feathers, used to show off an abundance of testosterone, which might be appealing to a mate?