If there’s one major lesson to learn from evolution, it’s that everything in nature has a purpose. Every trait, characteristic and creature has developed in a very specific way over time, to flourish in its environment, to thrive in a specific niche.

Bees aren’t fuzzy because they like looking cute and cuddly, it’s so they can collect as much pollen as possible with little-to-no effort when they land on a flower. Elephants don’t have massive ears because they’re hard of hearing, they use them as big fans, to cool themselves in the blistering African heat. Ant eaters don’t have super long tongues because they’re really into cunnilingus, it’s to reach the ants inside their anthills.

And magic-mushrooms? They aren’t just “magic” for shits and giggles, either. Somewhere in their evolutionary past, somehow, there was a reason they developed that trait — there is always a method to the madness.

And, according to research recently published in the journal Evolution Letters, that method has a lot to do with insects. Specifically, the kind that like to munch on these mushies.

We speculate that mushrooms evolved to be hallucinogenic because it lowered the chances of the fungi getting eaten by insects,” Jason Slot, an assistant professor of fungal evolutionary genomics at the Ohio State University told Newswise. “The psilocybin probably doesn’t just poison predators or taste bad. These mushrooms are altering the insects’ ‘mind’ – if they have minds – to meet their own needs.”

The idea, simply, is that insects who eat these mushrooms undergo such a mystifying and intensely psychedelic experience, they avoid those specific mushrooms in the future. Which makes sense. Imagine being the size/weight of a fly and gorging yourself on psilocybin mushroom…  

There’s no knowing what that experience is like for the insects, but it’s probably safe to assume it is existentially terrifying.

This would explain something that has confused evolutionary biologist’s for decades. Most of the mushroom species that have “magic” properties are not closely related to each other. That suggests that this is not a trait borne of “vertical gene transfer” (the passing of genes from a parent to a child), but one borne of “horizontal gene transfer” (the passing of genes from one species to another, similar one).

Horizontal gene transfer occurs between co-existing organisms, like different strains of mushrooms growing in the same environment. Because magic mushrooms grow almost exclusively on animal feces and rotting wood, their environment allowed for different kinds of mushrooms to share “life hacks” with their neighbors that made it easier to prosper.

One of those life hacks, according to Slot and his team, was psilocybin. That enabled the mushrooms that exhibited “magic” qualities, to thrive in places where there are a lot of fungus-eating insects.

Now, there are some people out there who will reject this explanation. To some, like the famous mushroom-sage Terrance McKenna, these fungi are our celestial teachers; they are the mystical guides of mankind, plant technology that evolved to open our minds to the wonder of the universe and the mystery of our existence. Some even suggest that they are alien creatures here to guide mankind spiritually…

To this crowd, the suggestion that the psychedelic power of psilocybin is just an evolutionary poison, is sacrilegious and disrespectful to the shroom gods.

Regardless, no matter which camp you fall under, Slot’s research is going to be important moving forward. Psilocybin is currently being explored by psychologists and doctors for its capacity to treat depression, PTSD and even addiction. Understanding the origins of the psychedelic properties they exhibit, will undoubtedly come in useful as more research is done into substances like psilocybin.

Psilocybin mushrooms in their natural prime.