body hair is actually largely a vestigial trait, meaning we're evolving to have less hair and not more hair. look at a chimp and look at a human and take notes on the direction that facial hair is evolving. so, we don't need to ask why men evolved hair, we need to ask why they haven't gotten rid of it yet, or, more specifically, why men have been slower to lose their facial hair than women have been.
that means that a better question to ask is whether the fact that men still grow facial hair makes them less evolved than women, who have largely evolved past it. and, that is a question that likely has to do with sexual selection, rather than any sort of competition. the answer is basically "yes".
but, any question that starts with "why did men evolve beards?" is completely backwards. men did not evolve to have facial hair, they are in the process of losing it - and are clearly behind the curve in doing so.
https://www.newsweek.com/beards-may-have-evolved-protect-men-punches-face-1504294
ask any woman whether they think hair gives men an evolutionary advantage.
it's disgusting - women hate facial hair.
humans are a species with remarkably low levels of sexual dimorphism. this difference in body hair is not shared in other primates, either, who have much more similar levels of body hair across the sexes.
it could take a while for men to catch up to women in their loss of body hair, but we can be reasonably confident that men will eventually lose their beards, over time.
so, stop asking "why did we evolve to grow hair?". that is the wrong question, in every possible context.
the right question is always "why do we have less hair than our recent ancestors?".
and, in the context of sexual dimorphism, what we need to understand is why men are losing their hair at a slower rate than women are.
is it possible that women were the hunters in early human society?
is that why they lost their hair more quickly?