But why do you want to do this? If I'm autoexploring, then that means I'm not interested in animating any corpses. Autoexplore could send me far across the map from any corpses, making it impossible to animate them anyway.

Well, this may hinge on my understanding of corpse and zombie duration. If I have zero need for more bottled blood right now and currently have sufficient zombies to explore safely, isn't it reasonable to leave some corpses where they lay rather than starting their zombie-lifetime right now, with no present danger? That would leave resources in my wake to bat back to, rather than greedily insta-zombifying every dead thing and sometimes seeing them all turn to dust before I'm done with the floor.

When you do an Animate Dead on an almost-gone corpse, doesn't it get the same zombie-lifetime as one made from a fresh corpse?

Usually the corpses rot fast enough that it's not an issue. Rest after a fight from low health -> all corpses rotted. If you go exploring and come back, you'll probably just find one or two skeletons instead of the corpses. Even if they are still corpses, the advantage in zombie duration is marginal, since they'll still have to walk out to where the enemies are. Unless you have lured an enemy back into the group of corpses... but I think usually it's better to have the zombies with you as you travel so that if a centaur or something finds you, you can retreat behind them.