It's pretty complicated and I don't even fully grasp it - but Vitamin D is more of an immune modulator. It isn't just that it enhances immunity - it can also decrease it too. This is probably a good thing most of the time, since it can keep you from having an under active immune system, nor an over active immune system. Extremely large doses, like 100,000 iu or more a day, can really put the breaks on the immune system. Before the advent of corticosteroids, Vitamin D was often used in doses up to 600,000 iu/dose in order to quiet the immune system during autoimmune disease treatments. Its effects were not strong enough, corticosteroids work much better, but in some patients it worked.
Large doses over 100,000 iu have also been examined in stroke victims and there have been some minor effects, which are hypothesized to be through reduction in the inflammatory/immune response in the brain.
In this instance, Vitamin D is kind of an ideal helper - before you get sick, having sufficient levels may make your immune system "strong" and help fight off the infection - but sufficient levels or even very high levels after you get sick may reduce the immune response to prevent the cytokine storm that we are seeing. It will also reduce the need for coticosteroids to achieve this goal as well - so you can use a smaller dose of things like prednisone and get the same effects with fewer nasty sides.
But this is also part of the reason that walking around with very elevated vitamin D levels can be harmful - and risks for stroke, etc. go up after a certain point. It's not just a "more is better" thing. Your closest friend often become your worst enemies if you're around them too much.