Well run restaurants waste as little food as possible, since that's all profit being thrown away.
Also equipment fails, vendors mess up, etc.
A friend used to work at a known cupcake chain in London and she literally threw out 30+ cupcakes a day. Whenever I was around, I'd try to convince her not to throw them but giving the box to some homeless or random passerby. Although that wasn't a common event given the boss.
So no, many places are stupidly wasteful, sometimes because of silly legislation.