I'd be tempted to call nipples in men vestigial, but that suggests they have no modern function. They do have a function, of course, but only in women. So why do men (and all male mammals) have them?
The two key concepts here are:
- sex-specific selection, and the fact that
- males and females share the majority of genes
1) sex-specific selection
Obviously, any population where females lacked nipples would be in trouble. Men, on the other hand, have no evolutionary need for them, but they don't pay much either - there is no strong selection against men with nipples. So at first sight, it seems that nipples are positively selected in females while seem to be quite neutral in males.
2) Males and females share the majority of genes
If you consider two separate species where the two species undergo different selection pressures, you will just see one species evolve toward one optimum while the other one will independently evolve toward the other optima.
However, males and females are not independent entities. The vast majority of our genes can be found in one sex as well as in the other sex. In other words, most male phenotypes do not evolve independently of female phenotypes. As a result of this interdependence, you can end up with the trait that is selected in one sex present in the other sex.
This is all much more rigorously defined in terms of selection coefficients and evolutionary pressure. Without going into the math, the questions of who has the highest selection coefficient and How differential is gene expression for this trait are important questions to predict the equilibrium trait value in both sexes.
Lack of a strong selection pressure
Finally, any trait that is seemingly not-useful has to have a significant disadvantage on the fitness of the organism to be selected out (Why do some bad traits evolve, and good ones don't?). Even if a trait is useless for both males and females it may persist. The case of females needing the trait just makes its elimination in males even more difficult, as explained above. However, in some mammalian species, the males do lack the nipples (Evolutionarily, why do male rats and horses lack nipples?).
I believe it is for this reason: the female body plan is the default one. Males are a variation upon that, in humans at least. Nipples are part of the basic body plan. For a man to not have them, he would need to actively evolve something that would prevent nipples from developing. There is no selective pressure for the development of such a thing, so it hasn't happened. Keep in mind that the code for the general body plan is shared between males and females. The Y chromosome modifies the development of that body plan so the person becomes male.
No one has mentioned the Neutral Theory of Evolution, which explains mutations that are not necessarily motivated by increased "fitness".
Similarly, (and more to the point for this question) there is no selective pressure with regards to men's nipples.
Men have nipples because they find a purpose on women, but for men, there is no reason to not have them. From an evolutionary standpoint, it is simpler for men to have them. The more complex situation (women have nipples but men do not) would most likely only occur if there was some selective pressure for men to not have nipples.
Sorry to spoil the fun here, but male nipples are not completely useless. With stimulation and hormones, they can be used to make milk. I don't have a great peer reviewed source for this, because it is sort of common knowledge. I heard about it at a Le Leche Leage meeting when my son was small.
Here's another article