When the king passed away, his corpse is often kept inside a tomb filled with booby traps and seemingly always protected by powerful tomb guardians. These tomb guardians are actually rocks and boulders brought to life using ancient forbidden spells and sacrificial ritual, they never leave the tomb and will clobber any trespassers even the deceased king own army. I kept wondering why tomb guardians are so much more powerful than the royal guards or even those summons by magic?
- Who says that that is the case? Your fictional king has a couple of stone guardians in his palace.
- Or the magic is powerful but it has a very limited active lifetime. The guardian cannot really fight forever, the spell gives it 24 hours of moving and fighting. If it takes 5 minutes to finish a group of intruders, that's enough for 288 "incidents."
- The magic depends on keeping the guardians in one area. There is a pair for the throne room, another pair for the bedchamber, and another pair for the palace nursery, but they cannot follow their principals.
- The guardians are very bad from telling friend from foe. It a tomb, it is acceptable to say "attack anyone but a consecrated priest with the right amulet arriving on the full moon." In a palace, that's not suitable.
As already pointed out by O.M. golems could be very bad from telling friend from foe. The mobility of guardians built for strength is also a large issue.
Consider a busy Palace, with coming and goings of people seeking council from the King. Having some confused golems around not knowing who to clobber would be extremely problematic. The clumsiness of these large constructs would also be an issue, as they would often not fit into small rooms and keep knocking stuff over whenever they moved. This would lead to (comically) awkward situations.
Also, the King isn't normally only sat on his throne at all times. He would go out on hunts, fight wars, diplomatic visits, and to inspect his kingdom. If mobility is an issue like that, having slow (clumsy!) stone golems or constructs following you around would be less than ideal. A group of human guards with the same mobility and speed of the king would be much preferred. The ability to rationally diffuse a situation rather than solve everything with violence would also be preferable, something which can't be expected from a mindless magical construct.
As for tombs, most of this isn't an issue. A guardian can be as violent, clumsy, and unwieldy as you want, making a whole different kind and strength class of guards possible.
The Guardians aren't really there to keep graverobbers out of the tomb. They're there to keep things in.
Funeral rites are on the face of them, rituals to to soothe the loved ones, and also allow the dead to pass on to their destination, whatever it may be. By channeling the thoughts and prayers of the mourners into the rite, their will and mana is used to ease the passage of the dead to the netherworld, and hopefully prevent the deceased, or other things, from coming back and pursuing whatever unhallowed goals they may have now.
When a King dies, an entire country mourns. That's a /lot/ of power flapping around, and can be attractive to the lingering soul of the King, or something on the Other Side that can crawl into the hole left by the departing Soul of the King and tap that mana.
So your priests bind that energy into the Tomb Guardians, who hold the door shut until the the wound between worlds heals and seals. And if the ritual falters, and something does try to come through, they're the first line of defense your country has against the threat.
The guardians have a sort of magical radioactivity to them.
The magic used to animate them steadily poisons those they spend time around. It took a few generations of kings to figure this out, but now they're used primarily for guarding tombs where this sort of side effect doesn't cause any undue problems (if anything, it would act as an even better deterrent).