Pheromones are advantageous because?

Pheromones are advantageous to people because this is what people excrete to attract the opposite sex. Animals also release pheromones to attract the opposite sex.