there are plenty of animals that would eat fungi, its nutritious. slugs, bugs. death cap is the most toxic, specifically anamita phalloides, destroying angels is one too. the toxin amatoxin-A, and phalloidin both are toxic to the liver, usually kills you within days if untreated. the symptoms are extreme hunger. mammals are most affected, but bugs/slugs evolved a way to deal with it.
anamita phalloides is a problem because its been introduced in the US from imported oak, its arbuscular mycorhizzae as well. and people have mistaken it for a edible version. it depends on the sitiuation, but producing chemicals is actually energy intensive and makes overall fitness for the organism less than the ones that dont rpoduce it. same goes for antibiotic resistant bacteria, they expend more resources in producing it. but its get complicated as bacteria might have other mechanisms to deal with it. if you look a the biosynthesis of amatoxin A or phalloidin, or any toxin, the molecule is quite complex, and requires several enzymatic steps, if you taken biochem you can sorta follow how its created, its quite fascinating.
phalloidin is used in biotech, for its staining ability, it stops actin in cells, so its useful when you want to trace specific proteins, or genes products.
a plant that produce similar effects with a different toxin. Cholchicine comes from the autum crocus, and its used to treat GOUT and mediterrenean fever. apparently gastropods are immune to death caps.
humans cant eat wild berries, but birds can, different evolutionary ways of dealing it.
toxic plants are also quite fascinating, monkshood is extremely poisonious to people, also known as wolfsbane,historically it was used to kill wolves. even touching the plant will poison you.
euphorbia plants, produce a toxic sap that cause severe dermatitis and blistering, burning it is unwise. thats why most animals dont eat things like euphorbia succulents(they look like cactuses). machineel, dynamite tree.
i believe mostly slugs, and insects can deal with death caps, anamitas, while mammals cannot. thats why birds can eat wild berries, because theres a survival strategy for the berries on the plant, they use the birds to spread the seeds to other areas.