Odours may be a kind of male "ornament" selected for by female choice. They meet the criteria for such ornaments that Charles Darwin set out in The Descent of Man, and Selection in Relation to Sex. After many years of study the importance of such chemical communication is becoming clear.
Males usually compete for scarce females, which make adaptive choices based on male traits. The choice can benefit the female directly and/or genetically. In tiger moths (Utetheisa ornatrix), females choose the males that produce the most pheromone; an honest signal of the amount of protective alkaloids the male has, as well as an indicator of the size of female offspring (females fertilised by such males lay more eggs). Male cockroaches form dominance hierarchies based on pheromone "badges", while females use the same pheromone for male choice.
In most species, pheromones are released by the non-limiting sex. Some female moths signal, but this is cheap and low risk; it means the male has to fly to her, taking a high risk. This mirrors communication with other sensory modalities, e.g. male frogs croak; male birds are usually colourful. Male long-range pheromone signals may be associated with patchy resources for the female. In some species, both sexes signal. Males can sometimes attract other males instead, the sex pheromone acting as an aggregation pheromone.