Some restaurants throw out perfectly good food. You can also try asking directly if they have food to throw out, but this might be harder if you're vegetarian, vegan or having other dietary restrictions.
Associated with restaurants is the concept and act of tabling which is the same as dumpster diving but involves the tables of restaurants rather than bins round the back.
"Tablers" visit restaurants, with McDonald's and Burger King being among the common examples, and reclaim the food left by other users of the restaurants before the staff come and clear it up. Some prefer to sit in the seat and act as if they paid for the food while others prefer to grab the food and eat it outside the restaurant. The brown bags some restaurants serve take-away food in are also a target for dumpster divers.
Synonyms: Some people may say "table diving" instead of tabling, but tabling could also just be a shortened form of table diving.