Ugh. It's amazing how incompetent medical systems are. I was also deficient in vitamin D and my doctor wrote a prescription. When I did the math, the cost was something like >$.10 per 1000IU. But if I bought the vitamins from a normal store, I would pay <$.01 per 1000IU. Since a person lacking sunlight only needs 1000IU, the price for giving everyone in the UK Vitamin D would be <$700k/day. And probably much less since most people won't need this high of a dose and bulk quantities would be cheaper.
For healthy people, taking extra vitamins is pointless, but giving them to people who are deficient in vitamins is one of the cheapest health interventions for the benefits.
PSA: if you're feeling off, make sure your doctor checks your various vitamin levels and see if cheap OTC vitamins help.