This is a cultural/situational phenomenon.
I know that in my parents' generation (which grew up with poverty), it is common courtesy to never take the last piece of cake/whatever. The host always has to make sure there's plenty, because 1 piece left means that people are still hungry.
Nowadays most people (in my culture and generation) are not so hesitant.
My mother has told me about this, and said that is was some kind of social taboo to take the last piece.
I believe it's about not being perceived as greedy or desperate, and rather show altruism through sacrifice and sharing.
The more sought-after an object is, the more valuable it will be. The poorer people are, the more valuable all kinds of food, cake etc will be.
The higher the value of an object, the more egocentric you have to be to claim it for yourself without sharing.
Thus people leave the last bit to avoid being seen as greedy or desperate, as greedy people will be seen as a burden in a poor society. Looking desperate makes you look like you can't take care of yourself.
In my own culture and generation, food is plenty everywhere, the perceived value is low, and you usually won't be seen as greedy if you take the last piece.
If you are eating with friends and family, you might still chose to stay off the last piece, because "maybe someone wants it more than me".
It's about sharing with those that you care for.
In evolutionary pscyhology, this makes good sense. Science has already shown that people with altruistic genes and behavior are perceived as more attractive (http://www.sciencedaily.com/releases/2008/10/081014134027.htm), and our ancestors had a better chance surviving if they cooperated instead of competing for resources.