The worst person in the world, while living, looses all consideration for how they’re treated. At that point, it’s not about what they deserve as much as it’s about living up to our own standards for how we compose ourselves.
We don’t feed evil people to rabid hogs not because they don’t deserve it, but because we respect ourselves more than that.
Likewise, everyone deserves a baseline level of dignity in death because that’s a standard we hold ourselves to.
It’s not for them.
That one also has the aspect of avoiding a deliberate insult. Desecrate the corpse and you risk turning it into a Thing™ that people might rally around.
killing him does that too, but people rally a little less around a relatively restrained killing of a valid military target and unremarkable handling of the body.