Given that vitamin D is created in our skins by sunlight exposure (or rather, by exposure to UV-B radiation), this corresponds with the employment distribution shifting from agricultural and other outdoor labor work towards office, cubicle-farm jobs. Additionally, making this worse, modern glass is highly impermissible for UV-B radiation [1], meaning that even if you do sit in a well-lit place you won't get enough to create enough vitamin D.
[1]: https://hps.org/publicinformation/ate/q12082.html