All male mammals have nipples.
The body doesn't "know" when it's very first developing whether it's going to be male or female, so it produces both sets of bits. These develop appropriately as hormones begin to kick in -- both in later development in the womb, and of course much later, at sexual maturity (puberty). Male nipples turn out to be redundant, but by that time they already exist.