In the Celtic tradition, a Wake or Party was actually held the night before the burial and the corpse was present. Food was eaten and toasts to drunk all in honor of the deceased. Some this this tradition was passed on to the general populace when the Irish immigrated to America. Food was usually brought to the deceased person's house so that meals wouldn't have to be cooked for awhile.
It was polite to offer condolences and many people want the company of others after attending a funeral or even just a memorial service. It is part of human nature to want to affirm life by doing something life sustaining after witnessing death, such as eating. It is interesting to note that love-making the night after a funeral is also very common.