"Oh sh*t, that was traumatic. I'll never eat these gorgeous little berries if they caused that".
On the other hand... "maybe if I take just a bit less, I won't almost die but just have a great trip". Hence, psychedelics.
https://science.howstuffworks.com/life/evolution/stoned-ape-...