I'd say there are several issues at stake, but first bear in mind that around one third of all food intended for human consumption goes to waste, globally (some of this is inedible parts, such as banana skins, corn husks etc but most is perfectly edible). Waste occurs from field to fork, including harvests that are spoiled by mould or vermin, damage in transit, right up to vegetables rotting unnoticed at the back of the fridge and leftovers being binned.
With so much of the food we produce not actually being eaten, this means that many of the resources used to produce that uneaten food are also being waste. Let's start with the land. 70% of the UK is farmed (this includes things like sheep grazing on hillsides as well as fields growing crops). The UK also happens to be one of the most nature-depleted countries, and one of the problems for nature is lack of habitat. If less food was being wasted, less land would be required to produce it, so there could be more space for nature. For a more dramatic example, consider the Amazon rainforest. Nearly 20% of it has been destroyed, much of that for farming. Soaring global demand for meat means that huge numbers of cattle now graze on what was the rainforest, and there are also vast areas of rainforest that have been cleared for soya bean production, 90% of which is used as animal feed (chickens, pigs, cattle). The mere act of clearing forest releases enormous quantities of carbon dioxide (a greenhouse gas) into the atmosphere.
Then there are the resources required for growing the food. For plant crops, there's water (about 70% of fresh water is used for agriculture, much of which happens in areas that are already water-stressed), fertilisers (which can pollute rivers and lakes), weedkillers and pesticides (leading to a monoculture which supports almost no other forms of life at best, and Parkinsons disease and cancers in farm workers and their families at worst). Some of these plant crops will be used to feed livestock, who will also require additional water (and let's not forget the routine use of antibiotics, since 65% of the world's antibiotics are fed to farm animals, in part to prevent disease spreading in crowded and unsanitary conditions).
Once they've grown, they have to be harvested, which generally requires fossil fuels to power the combine harvester/get the livestock to the abbatoir. More fossil fuels to move the food around the world and process them, and get them into supermarkets and back to our homes. Lots of packaging, much of it single-use plastic. 60% of food waste happens at household level, so we're back to the aubergine slowly liquifying at the back of your fridge, or the MNetters who roast a whole chicken but only eat the breast mest and bin the rest of the bird.
There's so much more I could talk about: Thailand's mangrove swamps devastated by prawn farming; the high rates of mental health problems and trauma amongst slaughterhouse workers; the lunacy of trade deals established with Australia and New Zealand rather than Europe in the wake of Brexit. But it's late and I'm tired, and you've probably stopped reading this now anyway.
However, in summary, food is of course necessary so we can't avoid all of the horrors detailed above, but if we can reduce food waste, we can also reduce the associated deforestation and water consumption and fossil fuel use and so on.