Acacias, a tree whose leaves giraffes feed on, release an airborne chemical called ethylene when eaten. Ethylene alerts nearby acacia trees to produce tannin, a toxin that makes the leaves poisonous. Giraffes avoid this by first eating trees downwind from others. – WTF Fun Facts
Source: https://www.tanzania-experience.com/blog/acacias-clever-species-of-trees/