I don't know... even when people did believe in the undead they didn't go through such lengths to destroy bodies.
Especially since depending on the culture a proper burial actually IS the best deterrant for the undead. Plus not all undead are "bad".
Those are the words of someone who hasn't lost 6 dwarves to a zombie plague.
Actually, I think that having crypts that are giant mazes and crammed with traps makes perfect sense in a world where those crypts are filled with mindlessly wandering zombies - the maze keeps them lost, and they'll wander back and forth over the giant serrated blade traps.
When you get right down to it, crypts and the like can only serve two real purposes - A) to give some kind of solace/closure to the living, and B) To keep the dead IN their "final" resting places.
Now then, since we don't need A, because coping with grief is what legendary dining rooms are for, all that matters is B, making sure the dead
stay dead. As such, it is not only rational to invest in booby-trapped and drawbridge-enclosable crypts (and making sure your dead are corporeal), it is actually completely irrational
not to ensure that you are prepared for the attack you know will be coming, eventually.
Though I do notice by my own limited observation that in mythologies that don't explain ghosts strongly tend to focus more on the "that is just how things are" in a similar way you wouldn't write an extra page about why the sky is blue.
This is caused by the oxygen-rich atmosphere we have, created by the planet's abundant plantlife, first starting with ancient stromatalites. The--- oh, wait, you DIDN'T want a page on why the sky is blue?