“When (if) a person has committed a sin that has a death penalty, and he is put to death, you shall hang him on wood. Do not let his corpse stay on the wood overnight; rather you shall bury him on that same day, for those who belittle G-d are hung” (D’varim 21:22-23). Based on the order of the wording (death and then hanging), the Talmud (Sanhedrin 46b) teaches us that the guilty party is first killed and then hung (earlier the Talmud discussed which sinners this applies to). As far as why it is only a momentary hanging, the Talmud (see also Tosefta Sanhedrin 9:3) quotes Rabbi Meir’s parable of twin brothers, one of whom is appointed king (in the Tosefta he was not necessarily appointed king, and is king of the world) while the other becomes an armed bandit. After being caught, the bandit is hung, but because of his resemblance to the king, people think the king was hung. (In the Tosefta, this is where the parable ends.) Therefore, the king has his brother’s corpse brought down (so there will no longer be any confusion). Rashi (on our verse) quotes the Talmud, adding a thought he also shared in his commentary on the Talmud to explain the parable, that man was created in G-d’s image. Since man was created in G-d’s image, having a man’s corpse hanging for all to see disparages G-d.
Mizrachi, quoting and explaining the issues Ramban has with Rashi’s explanation, presents a very simple question: how can anyone confuse the corpse of a sinner with G-d Himself? Whatever similarities there are between man and his Creator, they don’t include anything physical, especially since G-d has no physical characteristics. Man doesn’t “look like G-d,” so why would anyone seeing a man hanging think it was G-d who was hanging (as it were)? Granted, the parable is not meant to be taken literally, as G-d and man obviously do not resemble each other the way identical twins do (see Gur Aryeh), but still, why would someone punished for committing a very serious sin be compared by anyone to G-d in any way, to the extent that his corpse must be removed immediately so as not to belittle G-d?
Alshich says that by not leaving the corpse of the sinner hanging because man was created in G-d‘s image, we show that the “G-dly image” that had been subdued by the person’s sins is once again intact after the punishment was received. Although a nice thought (and Alshich is not trying to address our question), technically this does not seem to be the best place to teach it. First of all, since the “stain” from the sin is only gone after the punishment has been administered, the “G-dly image” could only have returned after the person was already dead, and whatever comparison there is between man and G-d, it has little (if any) connection to man’s physical body.(As opposed to if the “G-dly image” had been there until the punishment was administered, whereby the fact that there had been a “G-dly image” could be the basis for any comparison between the one who was hung and G-d.) Secondly, if the reason to remove the corpse is to send a message (that after the punishment, the “G-dly image” returns), hanging the corpse for less than a few seconds (“one person ties while another loosens”) doesn’t allow much time for such a message to be sent. If we would have hung the corpse (and left it there) to send a message to others that they better not do the same thing this person did, but because of the damage done by sending this message (as somehow people will think it was really G-d being hung, whatever that means) we only go through the motions of hanging but then remove the corpse immediately, the process makes sense. If, however, the point of removing the hanging corpse is to show that the “G-dly image” has returned, there is little time to get that message across, and most will be completely unaware of such a message. Additionally, we would still need to figure out what this “G-dly image” refers to that allows such a comparison to be made (and prevents us from allowing the corpse to remain hanging), which in turn teaches us that this “image” has returned.
When Rashi explains what it means that man was “created in G-d’s image” (B’reishis 1:26 and 1:27, using words he also uses in his commentary on our verse, “d’mus” and “d’yukin”), he says it refers to man’s ability “to understand and be intellectually active.” It is precisely our intelligence that allows us to be compared to our Creator, and using this special gift for inappropriate purposes reflects poorly not only on the Creator, but on the value of these abilities as well.
The first reaction upon seeing that someone was hung (after he was killed by stoning) for committing a major sin might be revulsion against the sin itself, or perhaps getting the message not to do anything similar, but if the corpse were to remain hanging, the reaction could change to trying to understand what led to such a terrible act being done. Aside from it being unhealthy to try to recreate the thought-process of a sinner, the G-dly intellect that we have each been bestowed with, and was misused by the sinner, will seem less special (since it was used for nefarious purposes). In order to avoid this aspect of G-d, which He instilled in each with us, from being belittled, we are commanded to not let the corpse remain hanging.