If the food will be thrown away anyway, eating it does no harm
In the narrow case, that is probably right. If a mistaken meal really will be binned and nobody orders more because you ate it, eating it causes no extra harm. The care needed is in checking that the case really is that narrow, because the same reasoning applied to anything already on a shelf or a menu stops being true.
What matters is the harm done to animals, and that harm comes from production. When a meal has already been made, served to me by mistake, and will go in the bin if I refuse it, eating it causes no extra suffering and creates no extra demand. Refusing it helps no animal. It only wastes food that cost an animal something to produce, and treats veganism as a matter of personal purity rather than reducing harm.
Where the food truly is surplus, this is mostly correct, and many vegans agree. The harm in eating animal products comes through demand: buying them tells producers to make more. A meal served in error, which will be thrown out whatever you do, sends no such signal. Eating it doesn't undo the harm already done, but refusing it doesn't undo anything either.
The question is how often a case is really that clean. 'It will be wasted' is easy to say and often not quite true. An airline or caterer that sees the wrong meal eaten may not record the mistake, and may load fewer vegan meals next time. A restaurant that sees a dish go may count it as a sale. Leftovers someone buys 'in case you'll eat them' get bought again next time. In each of these, eating the food does feed back into what gets made.
The reasoning also stretches easily. The chicken in the supermarket is already dead, and so is the one on the menu. If 'it's already been produced' were enough, it would cover every purchase. It isn't, because shops and kitchens restock based on what goes. The test that does the work is not whether the animal is already dead, but whether your eating it changes what is produced next.
There are smaller costs too. Friends and family who see you eat it may take it as permission to buy it for you, and habits are easier to keep with fewer exceptions. These are practical points, not moral rules, and people can reasonably weigh them differently. A person who eats a genuinely surplus meal now and then is not doing what the case against eating animals is aimed at. That case is about the purchases that keep the system running.