It's the mushrooms themselves. It could be a simple by product of the way they process wood. But it could also be for insects, to attract them to disperse spores. Except... "insects dispersing spores" isn't really a huge thing generally.
It's also probably multiple reasons.