While entertainment today works largely by satisfying our need for visuals (and to a lesser degree a soundscape), one would think that a key part of a truly immersive VR environment would be the subliminal cues of smells. Our primary sense of vision tells us the cold facts (and mercilessly reveals any shortcomings in the simulation); our tertiary sense of smell/taste would be what helps us get over the unreality of it all, making us feel "at home" in a flawed visual simulation.
Early holodecks would no doubt rely on injection of preexisting chemicals from suitable tanks via appropriate means (even a visually camouflaged hose would work fine, I guess). Later models might tailor the chemicals on the spot, ultimately by using replicators. And it's even possible in the Trek environment that the molecules would be "virtual", stimulating our olfactory sense without actually being the chemicals they pretend to be, and ceasing to exist as the computer turns off the power.
Holographic food would be a cheap byproduct of the technology vitally important to holographic sex, then. It could enrich certain simulations while being irrelevant to others. As suggested above, people might not want to eat certain types of food for real - say, about 100% of the foods available in realistic historical simulations of Earth cultures, and about 100% of the foods available in simulations of alien cultures!
Timo Saloniemi