There are three key reasons why mushrooms should always be cooked. First, to receive the nutritional benefits in mushrooms they must be heat tenderized. Shiitakes, for example, will pass through completely undigested if they are uncooked. The cell walls of mushrooms are simply not easily digestible without being treated with heat. Second, the medicinal benefits of mushrooms are also maximized when they are first heat tempered.
Finally, some mushrooms can actually be dangerous if eaten raw. Oyster mushrooms, for example, must be cooked to deactivate a hemolytic protein, which can be toxic. If eaten raw, the suehirotake mushroom can also cause serious infections in those with compromised immune systems.
Stamets, Paul. MycoMedicinals: An Informational Treatise on Mushrooms. MycoMedia