The modern study of genetics and DNA has shown that mushrooms (and other fungi) are more closely related to us humans than they are to plants. Here you see a mushroom and a mycologist (a fungal expert, in this case Dr Tom May) getting to know each other in the Melbourne Gardens of Royal Botanic Gardens Victoria.
This relationship makes some sense because fungi don't produce sugars using sunlight (i.e. they don't photosynthesise), their cell walls contain chiton rather than the cellulose found in plants (and chiton is found in the hard outer layer of insects), they contain proteins similar to those found in animals, and ... they can produce vitamin D.
Unlike humans, fungi don't seem to suffer from vitamin D deficiency but perhaps that's because the mushroom medical service is less interventionist. You can find reference to up to 80% of the humans in the USA being deficient in vitamin D. Whatever the real human deficit, vitamin D is certainly needed to allow calcium to be absorbed and turned into bone. Vitamin D is also implicated in keeping your brain healthy and its absence has been linked to various diseases and ailments.
I'll put my cynicism aside, although I'm tempted to put out a call for anyone who has had their vitamin D levels tested and been told they are sufficient. Let's start with the premise that humans need vitamin D for a healthy and worthwhile life, and that they can produce it from the action of sunlight on their skin.
So if you need more vitamin D you can risk skin cancer by exposing your surface to the sun, harvest the livers of cod (allowing them to ferment for a year if you are a traditionalist) or encourage some (edible) mushrooms in your lawn and then (if really edible) eat them. OK, there are few other sources of this vitamin but they are not as interesting.
Back in 2013 that ever reliable source of information, the UK Daily Mail, suggested we place our store-bought mushrooms out in the sun for half an hour to give us a dose equivalent to a tablet or two. Or if you prefer the view of a 'respected Australian scientist', Professor Rebecca Mason, head of physiology at Sydney Medical School, said (also in 2013) three or four small mushrooms left unwrapped on a plate in the 'midday summer sun' for two hours (longer in winter) will produce enough vitamin D for your average humans daily needs.
Although mushrooms and other fungi produce only one kind of vitamin D - called D2 - medical studies have (apparently) shown that the fungal dose can be as effective for humans as tablets with both D2 and D3. (Vitamin D1 is apparently less common and/or less important, as are D4 and D5.) Cooking doesn't damage the chemicals and may even help in their uptake.
All very interesting and another part of the evolutionary history shared by fungi and humans. What we need now is research into the well-being of those poor mushrooms produced in musty dark cellars.
Images: The plate of edible fungi is from a restaurant in Edinburgh, visited in September 2006. Here is the owner proudly showing me what would end up in my (very nice) pasta dish. I don't know that the mushrooms and other fungal fruiting bodies produced in this region would get much sunlight even when grown above ground.