Why do people avoid taking the last "donut"? In many contexts (family, colleagues, etc), say there is a box of donuts for people to take (or any kind of treat or snack). A lot of the times we can observe that there will be only one left and people just avoid taking the last one.

Is there a psychological theory/reasoning behind this?
What is interesting about this phenomenon is that it runs counter to the scarcity principle. Countless research has shown that the more scarce a commodity is, the more desirable it becomes. This is often capitalized on in marketing ("limited edition" and so on). Thus, the last donut should actually be even more attractive than one of many donuts. So something additional must be happening here.

Daniel Effron and Dale Miller did a series of experiments on this question. Their data is very nice because it shows that both things happen at the same time. The less supply or the more demand for a commodity (they used stuff like chocolate or the opportunity to watch a funny video), the more people wanted to have it. At the same time, they were slower or less likely to take it. The latter tendency increased with the number of group members. Effron and Miller show that this is related to a reduced feeling of entitlement--they call it "diffusion of entitlement". So we want the last piece of chocolate more, but don't think we are entitled to it. 

So what's the difference to the effects of scarcity in consumer situations ("black friday")? Effron and Miller discuss that it might be equality norms that are more important when we are in small groups. In contrast, in consumer contexts it might be more a norm of first come first served. It might be a matter of anonymity as well I guess. Whatever it may be, this data adds to research showing that often we are less selfish and care more for the outcome of others than a standard economics approach (homo oeconomicus) would suggest.

Source:

Effron, Daniel and Dale T. Miller. 2011. Diffusion of entitlement: An inhibitory effect of scarcity on consumption. Journal of Experimental Social Psychology. 47: 378-383.