Plants are proficient at volatile production and release these aromatics at great cost to themselves so there must be an adaptive function to the floral essences from leaves as well as fruit and flowers.
Plants attract pollinators with floral fragrances. They communicate with pollinators and gain an increase in cross breeding. Similarly fruit is fragrant when ripe to signal to seed dispersing animals. Think of plants as using fragrance to communicate, to influence the actions of others that can move.
However many volatiles are released only when the plant is attacked. First ethylene was known to travel through the atmosphere to activate plant defensive genes. But when methyl jasmonate is topically applied to tomato plants it also induces defensive proteins in the treated plants and in nearby plants as well. IT shows that if Sage (Artemisia tridentata), a plant that responds to methyl jasmonate, is grown in a closed green house with tomato plants the same defensive mechanism is triggered in it by methyl jasmonate released from the injured tomatoes. This demonstrates interplant communication occurs between species to activate the expression of defensive genes.