Usually spirituality follows practicality.
People marry to form family and, from a very religious point of view, to procreate - but such bonding and procreation happen with or without religion.
People have rituals to let boys and girls cease being children and become adults, but puberty and adulthood happen with or without those rituals.
People have rituals for cleansing and forgiveness but unless you are a sociopath you can be neat and generally be nice and have friends with or without that.
So, just the same...
People bury their dead with spiritual celebration, but they would have to bury those dead with or without religion anyway.
The role of spirituality is not to cause these things, but to give them meaning.
As for the practical reason why you have to bury the dead: animals in general live in a constant state of struggle for life and nutrition. When an animal dies in the wild, many creatures from different kingdoms and niches break the corpse down and reinsert its matter into the circle of life. Fungi do it everywhere. On land we have hyenas, ravens, crows, vultures, roaches, flies etc. Underwater crabs, some starfish, shrimp and many kinds of fish eat up carcasses leaving only bone behind (and often not even that).
But humans have a tendency to scare wild animals away from their territory. This has to do with fire, the pollution that we cause, how we are noisy and, in ancient cultures, the fact that everything that moves is game when it comes to hunting. So if you leave aunt Karen's corpse on the lawn to rot, it will stink for a long while. It may even explode and spread ooze. It will only attract the worst kind of carrion eaters like roaches, which will later make a home in our homes. And since her carrion wasn't fully eaten by vultures and such, a lot of that will become poisonous and make the ground less fertile. The accumulating bacteria may spread disease.
Better to either burn her away, or to bury her deep. And since we are at it, might as well do some social things to bring the tribe together. Because, you know, in the ancient times you can't just leave a sad reaction in a social network. You have to be there if you don't want to be a stranger.