Makes you wonder why we naturally selected for ancestors who didn't have the vitamin synthesis machinery. Clearly there must have been some evolutionary disadvantage associated with vitamin synthesis, or else as you say it's clear benefits should have conferred an evolutionary advantage and still be with us today.
Not necessarily. If any early human diet that produced enough calories for them to live and procreate also happened to have plenty of vitamins, then synthesizing your own really didn't confer any evolutionary advantage.
I'd also note I don't see any reason we'd want to synthesize our own vitamins now. It's virtually impossible to get a vitamin deficiency unless you try to eat a very restrictive diet for some other reason.
There was little selection selecting against the loss it when it was abundant in out ancestors diet at that particular time and place. so by the time it became an issue it was already missing from the gene pool and as it is easier for a mutaion to break a gene than it is to gain function so its unlikely to mutate back into the genome by chance.