Basically, because they grew before your* body decided to become male, and began producing the correct hormones to modify the basic template into something with male gender. Early in fetal development (as early as week 2 or 3) the body forms "milk ridges" which run from the armpit and across the chest and down toward the groin. The nipples form along that ridge (and likely some of our gentle readers have an extra nipple somewhere along those arcs). Around week 14 of pregnancy the genital development begins ... you're already breast-enabled by then.

By the way, your labia began to fuse into a scrotum around this time ... that's why you no longer have ... well, you get the idea.

There's no evolutionary reason to lose them, so there they sit.

* Discussion assumes a male reader, only for simplicity of argument.