You know why throwing away even good food is preferable to donating it? Because if you throw it away you just account for it as a loss, but if you donate it you still owe the government the VAT just like if you sold it.
I know it's how it works in Portugal and I wouldn't be surprised if it was because of some EU tax directive that it's like that. There are some exceptions, ofcourse.
That's surprising! So say I buy a bunch of produce from a farmer for my shop in Portugal. In the case where I sell it I'd expect to pay VAT on my margin. But how would my accounting differ between putting it in trash bags and putting it in a box labeled "free"?