Give me an experiment that will demonstrate your claim that plants evolved into having this charasteristic.
Well it wasn’t magic, and herbivores tend to stay away from spicy foods. If you can’t see that’s evolution then there’s no possibility of ever having an intelligent conversation with you.