My workmate, who is a native speaker, sent this email the other day:
John and myself had birthdays in the last week, and as a result there is cake in the kitchen for those who would like some.
I wonder why he wrote cake, not a cake.
*The noun cake is both countable and non-countable.*
"A cake" can be a large cake which is cut into pieces, and served simply as cake (non countable), or sometimes as pieces of cake (countable).Would you like some cake? or Would you like a piece of cake? are both acceptable forms.
Or it could be a small individual cake, which is usually eaten by just one person, and is always a cake (countable).
What your friend left you was non-countable i.e he left you "some cake". However as often happens he elided the some. In the same way he may have left (some)water or (some)milk.