Why is there a whole raft of genetic diseases in the human population now? Shouldn't they have been "selected out" a long time ago?
Many genetic diseases are the result of optimizations for other things (anemia is related to malaria resistance, there is some problematic gene in a Jewish sub-population that is related to plague resistance, etc.)
Evolution is continuously running an extremely complex multi-dimensional optimization problem with a time-varying objective function. Local minima abound, and it's easy for organisms to get trapped in them.
Furthermore, kin selection and possibly group selection play a role in human evolution, which makes the whole thing even more complex and non-linear. So looking at specific genes and saying, "That doesn't make sense!" as if there was some obligation for the universe to "make sense" to our naive pre-scientific intuition is fairly silly.
The human genome is a Rube Goldberg apparatus that manages to make hundreds of thousands of products out of 40,000 strongly interacting templates plus a bunch of ridiculously inefficient secondary control mechanisms like micro-RNAs (which in some typically degrade already-transcribed mRNA). Pointing to one step as if it can be considered in isolation from everything else is not a good move.
Loss of vitamin C manufacture could well have to do with the development of some other pathway that was more important at the time, and may well continue to be more important today. The only way to really find out is to either a) understand the genetic trade-offs in detail or b) ask some volunteer to have their vitamin C production turned back on by a technique like this. Personally, I'd recommend the former.
Given how weird humans are developmentally, some things like this may be important when we're young and not so much when we're older, so in the fullness of time we may find we can turn on vitamin C production only after people mature, for example. The possible range of futures, given how little we know now, is large.
In the meantime, we have plenty of people with genetic diseases that we know the cure will not significantly disrupt their cellular machinery, because we have lots of examples of people without those diseases who are just fine.