> A plant that keeps putting harmful substances in its fruits is losing the game at middle term. We would just spread more seeds of its tastier competitors instead.
Humans indeed find some endogenous pesticides unpleasant; but we enjoy others very much, to the point of addiction. For example, nicotine from tobacco dust was used historically as a pesticide on other plants, and many modern synthetic pesticides are nicotine analogs (neonics). On a milder note, the compounds that give many herbs their flavor are also insecticides--it's easier to grow basil without an aphid problem than lettuce. The question of why we evolved to enjoy those poisons is interesting, with no clear answer:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3817850/
That said, the original claim makes little sense. Natural pest resistance often arises from higher concentrations of endogenous pesticides, but this would generally just mean something like "stronger-tasting herbs", not any harm. Even if it were harmful, conventional growers prefer varieties with good natural resistance too.