system
Given the following post, respond as if you're commenting on Reddit:
human
Why do coffee and tea plants produce caffeine?

The benefits that people get out of consuming caffeine as a stimulant are pretty straightforward, but what is the reason that plants produce the chemical in the first place?
gpt
Caffeine is produced by plants as a defense against insects. You find caffeine in the parts of plants most vulnerable to herbivory: coffee beans which develop into seedlings, tea leaves, etc... Many naturally occurring poisons have been co-opted for alternative uses by humans because we are simply too big to be killed by them. Examples: nicotine, caffeine, morphine, ephedrine, psilocybin (these are all termed *alkaloids* if you're interested in further research).