Right, but the carbon in food comes from plants (or, comes from things that got their carbon from plants) which got their carbon out of the atmosphere from recent photosynthesis. It's carbon that's already part of the carbon cycle, which is a dynamic but overall steady-state system.
Emitting carbon which recently came from the atmosphere back into the atmosphere is not a problem. Emitting carbon which has been safely stored in rocks for tens (or hundreds) of millions of years is the problem. That's the carbon that's caused the increase in CO2 from 280ppm 200 years ago, to 420ppm today, which is the driver of climate change. Nothing to do with food waste.