This might be a question which is impossible to answer, but I sit hear drinking my Green Tea, wondering how exactly the leaves of Camellia sinensis were discovered to be brewable.
Did people just get poisoned / die when eating inedible plants and that's how we as a species learnt what to eat and what not to eat?
may I suggest x-posting this question to /r/AskScience: the question could apply equally any species, not just human beings