Peppers are plants and those that are spicy use their spiciness as a defense mechanism against predation. In fact, scientists thought that pepper plants evolved spiciness to deter mammals from eating their fruits. However, is this the only reason why pepper plants are spicy?
Some scientists believe that the spiciness to protect against predation might simply be a secondary characteristic of pepper plants. It is believed by some researchers that the spiciness might actually be a defense mechanism against small invaders: insects and molds.
The main chemical component that makes peppers spicy is capsaicin; which binds to special heat-sensing receptors on our tongue.