Food is more complicated than this picture. So much that nutritionists have major differences over which basic materials are beneficial in bulk and which cause health problems. Vitamins, minerals and medicines are not automatically absorbed well by our digestive system. The many biological foibles of human metabolism and our symbiotic gut flora, still confounds expectations about what food can be and can do to health.
There have been many, perhaps endless attempts to synthesize a wholesome food product - it would be worth a fortune. I am aware of zero successes to date and this shouldn't be the case if its not very difficult. We don't even synthesize sugar for consumption - maybe start there, but it is not even clear if/how much it causes diabetes or other diseases.
We might be stuck for a while longer with reliance on foods that needs to live for bit (plant or animal) before we can sustain our own lives with them - seems to be a very old system requirement of multicellular life, and one that has not been cracked yet.