If you're a Wall Street banker, you could probably never pay for a meal in a week without even trying to. It is always "Thanks for coming to our conference: lunch is being served, just walk over to a table", "Don't worry Bob, the firm has got this dinner.", "Before our meeting, please help yourself to coffee and snacks.", etc etc. Social food freebies extend pretty far down into the upper middle class, too: if I walk into any glasses shop in town and ask them to rebend my frames for me, they'll bring me a coffee and cookies so I don't get bored while waiting for my free repair to complete.
So when you see a basket of donuts at the office, you assume it is like every other basket: free. The jar next to it with the sign you didn't read because no one reads anything? Tip jar, obviously, like it was the last 42 times.
But also: if the final tally was done only by the total at the end of the day, the test may be measuring a late steal, rather than a lower rate of payment. And the one person who stole might be of any background -- perhaps compulsive, perhaps struggling-to-get-by but 'passing' as a high-income worker, etc. -- and not representative.
The price of a candy bar is more significant to a low-income worker than it is to a high-income worker, and thus the weight on the conscience when "stealing" one necessarily has different impact.
If something doesn't seem valuable, it feels "less wrong" to take it.
If the items placed in the high-income workplaces had proportionately higher value, would the "honesty" increase?