The walls of the mycelium, which make up the solid substance of the mushroom, are composed of chitin, the substance forming the exoskeleton of insects. Humans do not have the necessary enzymes to digest this material. Cooking breaks down the mycelial walls, releasing the nutritious components of the fungus available for assimilation as food.
(http://www.mssf.org/cookbook/part_4.html)