Although we generally treat peppers as 'vegetables', they are many-seeded berries like their cousins, the tomatoes. Both peppers and tomatoes are native to South America and both are members of the Solanaceae, a family notorious for its alkaloids.
Some peppers like those of the Grossum group are mild, others like the Longums produce a molecule called trans-8-methyl-N-vanillyl-6-nonenamide, a chemical related to vanillin, the scent and flavor of vanilla. N-vanillyl-6-nonenamide is more commonly known as capsaicin, a rubifacient or chemical that creates a sensation of heat.
In the mouth, capsaicin can cause gasping, bring tears to the eyes and sweat to the forehead. Rubbed on the skin, capsaicin creates pain-relieving warmth for sore muscles or can blister the skin if the concentration is too high. Many people have developed a taste for capsaicin because it induces a release of endorphins, the body's natural painkillers. But during the evolution of the plant, capsaicin was never intended for enjoyment. It was intended as a deterrent.
Capsaicin is made in the placenta of the pepper, the whitish tissue inside the fruit where the seeds are attached. Fully ripe peppers are brightly colored to attract birds; most mammals are color-blind. If a mammal eats the entire pepper, the seeds are destroyed during the process of digestion. Capsaicin halts most mammals after one bite.
Birds, though, cannot taste capsaicin and their digestive process does not damage the seeds. Birds were the 'intended' dispersers of pepper seeds. But about 9500 years ago, natives in South America liked the spicy chile piquin (bird pepper) so much they began growing and selecting types with pleasing shapes, colors, and flavors. And people spread peppers much farther than birds ever could.
(Compiled from: "Capsicum", Hortus Third, Staff L.H. Bailey Hortorium. NY State College of Agriculture and Life Sciences, Cornell University, Macmillan, NY, 1976; "Capsicums: Innovative Uses of an Ancient Crop", Paul W. Bosland, Progress in New Crops, J. Janick, ed. ASHS Press, Arlington, VA, 1996; "Capsaicin", Merck Index, 11th Ed., Susan Budavari, ed., Merck and Co. Inc., Rahway, NJ, 1989; and "Chile Terminology", Chile Pepper Institute, College of Agriculture and Home Economics, New Mexico State University, 2006.)