Vitamin D is a either a hormone or a precursor to hormones. It is very unlike any other vitamins, which are either cofactors or antioxidants, or may be other chemicals necessarily performing catalytic function, just like transitional metal.
But in all sources I found so far it says that Vitamin D doesn't really do anything chemistry-bound, but rather just works as a hormone matching some arbitrary protein receptors or something. E.g.f, it signals something to the body. But what? And if nothing, then why does not evolution not select out-select Vitamin D in favor of endogenous chemical or nothing at all?