I am curious whether the practice of burying the dead started as a religious ritual or out of concern for public health. I am sure it didn't take much science for the early humans to realize the stench of a corpse and that disposing of it under ground helped maintain the living quarters more pleasant and sanitary. But did spirituality (even non-spiritual cultural respect for the dead) precede sanitation?
The earliest undisputed purposeful burial we have found was from about 100,000 years ago. There's some more controversial evidence that Neanderthal man was performing burials far earlier than that.
Given the body painting on the find, it is generally assumed there was some kind of ritual purpose to it. I suppose its possible there may have been sanitation concerns too, but there's no real evidence of that, and it seems highly unlikely.
However, it should be noted that the two aren't necessarily distinct. For example, it is argued that a lot of ancient Jewish Kosher practices are rooted in real-life sanitation issues. Not all of them are effective at it, but this was far before the Scientific Method, so the framework for testing theories of sanitation was not what it is today.
The ritual was before the sanitation. Even the old cases (40000 years ago) of burial shows some kind of ritual. In fact, some traditions during the classic era didn't use burial or cremation, but instead the body was given to the vultures. So the ritual was even in recent times more important than the sanitation.
That makes me remember the last epidemia of ebola, where the ritual was so important (cleaning the body) that many people got sick during this process, and they rejected the idea of cremation of the body without fulfilling the body cleaning first.
It is perfectly possible that burial has been practiced by non human and even non primate beings.
Elephants sometimes bury dead elephants. In fact they sometimes bury dead or sleeping humans as well.
Occurrences of elephants behaving this way around human beings are common throughout Africa. On many occasions, they have buried dead or sleeping humans or aided them when they were hurt. Meredith also recalls an event told to him by George Adamson, a Kenyan Game Warden, regarding an old Turkana woman who fell asleep under a tree after losing her way home. When she woke up, there was an elephant standing over her, gently touching her. She kept very still because she was very frightened. As other elephants arrived, they began to scream loudly and buried her under branches. She was found the next morning by the local herdsmen, unharmed.
Thus the original reasons for burial by humans may remain as unproven and mysterious as the reasons why elephants sometimes practice burial.
May I point out that doing something with the body to avoid attracting scavengers/predators predates both. If you don't like the idea of having your mate's body violently torn up and scattered --or, as @jwenting pointed out, having the beasties go after your living relatives once they've been draw to the area by the scent -- there aren't many no-tech alternatives.