Some studies found that both men and women perceive men with beards as stronger and more aggressive. Men with dense beards can intimidate rivals, thereby gaining more mating chances. Other research suggests that people with beards are seen as more dominant.
Thus, in the process of natural selection and survival of the fittest, men evolved to have beards.