We once had genes that synthesised vitamin C. We still have them in our DNA, but with deleterious mutations. But we still need it, so we have to get it from the environment. This comes from our diet. So it should ask the question why if we needed it did we lose it? The answer is that it's costly to synthesise for ourselves, and when we get it as part of our food source we're essentially get it "for free". I think this is a great example of how the environment is an important part of an organism, that in our phenotype there is the necessity for something that can only be gotten through consumption.
The implications of this give an explanation for items like glasses. Those who have problems with being short or long-sighted have no disadvantage in reproduction thanks to being born in an environment with a correction. Just as we don't need to spend our days eating because of the invention of cooked food, or have to worry about extremes in temperatures because we can live in dwellings that we don't need to make either.