Doughnuts and pastries. Stalks of still-crunchy celery. Bags of bright, plump oranges. It sounds like a shopping list, but it was all in Walmart's garbage.

CBC's Marketplace went through trash bins at two Walmart stores near Toronto to see how much food the company throws away.

Over the course of more than 12 visits to the stores, Marketplace staff repeatedly found produce, baked goods, frozen foods, meat and dairy products. Most of the food was still in its packaging, rather than separated for composting.

Also in the garbage: bottles of water, frozen cherries that were still cold and tubs of margarine.

In a statement, Walmart said it believes the food Marketplace found was unsafe for consumption.

In many cases, however, the food was well before its best-before date and appeared to be fresh. Or, if it needed refrigeration or freezing, the food found was still cold.

Marketplace investigated what gets thrown away at two Walmart locations near Toronto over twelve days. Here's what was in the garbage on one day staff visited. 1:04

Marketplace staff looked for food waste at all the major retailers, including Costco, Metro, Sobeys, Loblaws and Walmart. While staffers found bins full of food at some Walmart locations, other chains had compactors making it impossible to see what they throw out.

Marketplace found cartons of milk days ahead of their best-before date, and Parmesan cheese with months left before it needed to be thrown away.

On one trip, Marketplace staff found 12 waist-high bins full of food. After Walmart was contacted, it locked up the bins behind the stores where the food was found.

These bags of oranges were found in a Walmart Canada garbage bin on one of 12 trips to a Toronto-area store. (CBC)

Ali-Zain Mevawala says he threw out a shopping cart full of produce every day when he managed a Walmart produce and bakery department.

Mevawala, formerly with one of the company's Edmonton stores, says if a piece of fruit or vegetable didn't look perfect, it had to be thrown in the trash.

"I really felt bad because I know a lot of people in the city or in this country, even in this whole world, they don't even get to eat proper food."

'What's wrong with all those bags of oranges?'

Food waste is a worldwide issue. In Canada, a study from Value Chain Management International says across sectors, including at the farm, during processing, in retail stores, restaurants and in homes, $31 billion worth of food is wasted each year.

Retailers are responsible for about 10 per cent of that waste, according to the 2014 study.

Ali-Zain Mevawala says he threw out a shopping cart full of produce every day when working as a produce and bakery department manager at a Walmart store in Edmonton. (CBC) One of the report's authors says retailers are just doing what buyers expect.

"Much of that waste is usually us not willing to buy products that have a blemish in them," says Martin Gooch, CEO of Value Chain Management International.

There are challenges in donating food, including location. It's easier to redistribute food in Toronto than in smaller communities, he says.

He adds that retailers are working to address in-store processes and training so waste is reduced.

Despite laws preventing companies that donate food from being prosecuted if someone gets sick, a key challenge is public opinion, should something happen, says Gooch.

CBC Marketplace went through trash bins at two Walmart stores near Toronto to see how much food the company throws away. (CBC) "Someone who'd gotten sick from a product that was donated, that would create a whole bunch of attention … which a retailer or manufacturer has no way of combating."

After viewing Marketplace footage, Gooch says the amount of food waste discovered demonstrated there is "room for improvement."

"What's wrong with all those bags of oranges?" he said.

Gooch did say some of the items Marketplace uncovered, such as bagged salad, could be unsafe if they had passed their "use by" date.

Walmart responds

Walmart declined an on-camera interview with Marketplace, but the company sent a statement that said it has many initiatives to decrease food waste throughout the company, including giving unsold food to food banks.

After Marketplace contacted Walmart, the company locked up the bins behind the stores where the food was found. (CBC) "On some occasions, food which has not passed its best-before date is deemed unsafe for consumption," Walmart said in its statement. "As a rule we don't place fresh food items on display for sale if the quality is not acceptable."

Some of the products may have been returns, the company said.

Mevawala says he was given a different reason for the waste when he worked at Walmart.

"Once I asked my manager, 'Why do we have to just throw it away? Why can't we just, you know, give it away to some people that really need it?'" he says. "And the manager [said], 'If you just give it away to people, then why are they going to buy it from us?'"

Walmart Canada says Mevawala's claim doesn't reflect its approach to food waste.