Men have nipples because embryos are always female in their early stages, and males only differentiate from the female prototype after a few weeks. This is due to the fact that both sexes initially start out the same, with the same basic genetic blueprint, and only later develop into either male or female depending on the hormones that are present. As such, both sexes have nipples as they are both derived from the same genetic blueprint.
I believe that after we develop sex organs, it just doesn’t get rid of the nipples.I could be wrong though, and if someone has a more educated response, I will definitely stand corrected! 🙂