They find that variation in production of Capsaicinoids (hot stuff) is explained by variation in the damage caused by a fungal pathogen of chili seeds...so the hot stuff protects the plants from pathogens. I assume they discuss other ecological factors (climate, maybe) that explain why other species of plants don't do this also. I bet green chile farmers in New Mexico would know a lot about this since they maintain lines of varying hotness (hot, medium, mild) and have to deal with "pests".
Evolutionary ecology of pungency in wild chilies
Joshua J. Tewksbury, Karen M. Reagan, Noelle J. Machnicki, Tomás A. Carlo, David C. Haak, Alejandra Lorena Calderón Peñaloza, and Douglas J. Levey
PNAS 2008 105:11808-11811
Abstract: The primary function of fruit is to attract animals that disperse viable seeds, but the nutritional rewards that attract beneficial consumers also attract consumers that kill seeds instead of dispersing them. Many of these unwanted consumers are microbes, and microbial defense is commonly invoked to explain the bitter, distasteful, occasionally toxic chemicals found in many ripe fruits. This explanation has been criticized, however, due to a lack of evidence that microbial consumers influence fruit chemistry in wild populations. In the present study, we use wild chilies to show that chemical defense of ripe fruit reflects variation in the risk of microbial attack. Capsaicinoids are the chemicals responsible for the well known pungency of chili fruits. Capsicum chacoense is naturally polymorphic for the production of capsaicinoids and displays geographic variation in the proportion of individual plants in a population that produce capsaicinoids. We show that this variation is directly linked to variation in the damage caused by a fungal pathogen of chili seeds. We find that Fusarium fungus is the primary cause of predispersal chili seed mortality, and we experimentally demonstrate that capsaicinoids protect chili seeds from Fusarium. Further, foraging by hemipteran insects facilitates the entry of Fusarium into fruits, and we show that variation in hemipteran foraging pressure among chili populations predicts the proportion of plants in a population producing capsaicinoids. These results suggest that the pungency in chilies may be an adaptive response to selection by a microbial pathogen, supporting the influence of microbial consumers on fruit chemistry.