Shallow Grave: the Tomb as Refuge.
The custom of burial may have arisen not from respect for the dead, but for the living.
On those occasions when a man was sick or injured, and companions were unable either to carry him to safety nor stay and tend him, the simplest recourse was to build a refuge, stocked with food and weapons, in which the injured person would remain, protected from the elements and from predators. Here he would remain, visited regularly with food, until he either recovered or died.
The circumstance could arise in several ways. An injured or sick person is at camp, but the camp itself is about to be moved several miles. Or else the injury is received by a member of a foraging party, whose other members have to return to camp.
One solution, in relatively soft soils, would have been to dig a shallow pit, line it with soft grass, lay the injured man in it, put tree branches and leaves over him, and backfill with the already-dug earth. Above his head, so that he could breathe, and also be fed, would be an opening, covered by a heavy stone.
This arrangement would provide shelter from the elements. The individual's own body heat would serve to warm the small chamber. The headstone and covering branches would defend against predators. The covering of earth, with the original plants replaced, would give concealment. Scattering strong-smelling plants or flowers would help to conceal his odour from predators.
In this shallow grave, the injured man would remain until he had recovered his strength, at which point, he could himself push up the headstone, and exit. While he recovered, his companions would periodically return with food, looking for the headstone, to enquire about his health. If, however, he did not recover, the refuge would become his tomb. When his companions returned and found him dead, they would leave him where he lay, perhaps taking any items of value he possessed.
Such a procedure would give a wounded man a chance. A determined predator, having found him, could dig him out, but might meet with resistance. A heavy animal, walking above, might crush him. A flood might drown him. The ideal burial place would have been in a raised area, protected by trees and rocks.
In terrain too hard to dig a grave, a variation would be to pile stones around the injured man, creating a dolmen.
In this approach, the grave was originally a refuge for sick or injured individuals, not a last resting place for the dead. All the customs of burial, of raising a headstone, of visiting the grave, of leaving flowers, are perhaps a re-enactment of a procedure which was used for hundreds of thousands of years. It perhaps left us also with a myth of resurrection, tales of dead men who rose from their graves, and of being buried alive.