We don’t have the organ to sense pheromones, but we weren’t going to lose the ability to produce them first.
But also, it’s an armpit. A big slab of meat touching one of the hottest parts of your body. It’s going to trap heat which stimulates sweating.
About the stinking, you would better look for these bacteries advantage :)
Sweating is good for heat management, the smell is useful for mate selection.
Hormones are weird. We can smell things we don’t think we can smell.
Did you mean pheromones? There is no evidence that humans are affected by pheromones.
Supposedly the smell was something prehistoric people would flaunt. Mating in a lot of species is odor-based, and at one time, we were no exception. They did an experiment in an episode of a science program called Brink where they made a pheromone system that could be used to detect how related you were to a potential mate and found it successful. For us, they say, it just happens to gather in our armpits.
Whatever prehistoric people thought, nowadays we seem to dislike body odor and tend to favor filling the room with a mist of Old Spice.