Yes, vegetables are plants that are trying to kill you. Their only defense to survive is to secrete and produce inflammatory chemical responses, bitterness, spiciness etc.
If that would be the case, this logic would also apply to meat. Animals/meat do not want to be 'eaten'. So they also would deploy those defensive strategies.
Mutations are random and blind. There is no higher-level planning like "I develop inflammatory inducing stuff so I won't get eaten'. If crops are planted/tended by humans there is no evolutionary pressure to develop poisonous response.
this territory is moderated