The word, 'wake' in this sense comes from the Old English word 'wacu', meaning 'a watch' as in night-watch...ie a form of vigil. It often referred to the eve of a religious feast-day, when believers would stay awake all night, sometimes combined with fasting, in preparation for the great occasion.
In somewhat later times, the idea had more to do with feasting than fasting! Hence, the Irish idea of a funeral wake at which food is available and drink flows freely.
Accordingly - as burial rites are a form of religious observance - I'd say it was more that than a precaution against someone's being buried alive as some people believe or as a hoping for life to return, as the Wikipedia article linked-to above suggests.