You might enjoy the kick that peppers add to salsa or chili. But from the chili pepper's point of view, that heat fulfills the same function as the cyanide in apple seeds—it defends the plants from invading microbes that want to eat them.
[National Geographic]. In fact, according to the new research, the peppers varied their amount of heat by how large the threat of fungal infection was. In insect-rich parts of Bolivia, where the University of Washington scientists did their study, chilies are chock full of capsaicinoids—the chemicals that give peppers their kick. On the other hand, peppers growing in areas where there are few insects, and thus little of the fungus, didn't bother to produce much capsaicin, some being as mild as bell peppers, the researchers found [AP]. The remaining question, then, is why humans enjoy eating peppers full of spicy chemicals.
When insects bore into a pepper, ...