There is nothing, and I mean nothing in TFA that puts any weight behind the hypothesis. It presumably has some beneficial effect on the mushroom, and some guy thinks the benefit might be as an insect repellant. That’s it. From the article in question:
However, while psilocybin has been shown to affect the brains of mammals including mice, there is little evidence that it affects insects or other invertebrates – barring a famous 1962 study showing that it changes the way spiders build webs.
Argh. Down boy! Bad Boing Boing!