That, and there isn't enough sunlight in many places, and many people's bodies can't make enough Vitamin D with sunlight (and the body's ability to do so decreases as you age).
The idea is that if vitamin D improves outcomes for covid 19, and the stores are all out of the supplements, then you can go in your backyard instead.
Backyards are relatively uncommon in some places in America: lots of high-rises, many without balconies.