Thanks for the point about teleology in science. I study the epistemology of science, and one of the great milestones in the history of scientific thought is in the rejection of teleological explanations in science. Guys like Galileo and Descartes, in their rejection of teleology, really paved the way for people like Newton to make enormous strides in scientific theory. The rejection of teleological explanations is one of the most important demarcations between science and pseudo-science.
To keep you from eating them. If you ate a meal's worth of psychoactive mushrooms you would get sick and possibly die. Same thing with coffee beans, chocolate, marijuana, and many other plants that produce alkaloids to prevent animals from ingesting them. It's a happy accident that humans figured out a small amount of the plant, prepared in the correct way, can be a bit of fun to ingest.