Suppose that due to some kind of magical force I'll leave handwaved, (non-sapient) organisms are able to practice necromancy, reanimating their fallen peers as undead bodyguards.
However, the magic lasts only a limited amount of time, let's say a few hours, so they have to perform the resurrection only in the hour of need. The reanimated organism has full sentience and capacity for movement; however, they will be in whatever condition the cadaver was at the time of the necromancy.
This might eventually lead for a selection pressure for organisms which were in better condition well after death; an organism which was somehow adapted to decompose less (As for why this would benefit their genes, assume the organisms who resurrect them are close relatives and thus they still protect their own genes, like eusociality).
What evolutionary changes might occur which would make a species' dead body more resistant to decomposition?