וְכִֽי־יִהְיֶ֣ה בְאִ֗ישׁ חֵ֛טְא מִשְׁפַּט־מָ֖וֶת וְהוּמָ֑ת וְתָלִ֥יתָ אֹת֖וֹ עַל־עֵֽץ׃
און אַז אױף אַ מאַן װעט זײַן אַ זינד פֿון טױטשטראָף, און ער װעט געטײט װערן, און װעסט אים אױפֿהענגען אױף אַ בױם,
Siftei Chakhamim
Scripture positioned going to war, ... to teach, etc. Rashi is answering the question: Scripture should have juxtapositioned over here the judiciary laws of parshas Ki Seitzei (below 21:22), “If a man is guilty of a capital offense, etc.,” and the other capital offenses mentioned there. He answers, “To teach, etc.”
English Explanation of Mishnah Sanhedrin
Introduction Mishnah four describes how the person was to be stoned. The mishnah also discusses the hanging mentioned in Deuteronomy 21:22-23. We should mention that we don’t really know exactly how this hanging was to be performed. The JPS translation translates it as “impaling” but this is not the literal meaning of the word. The purpose of such an action was to expose the body, and it was a common practice in the ancient and indeed also the modern world. The Torah states that while this type of action may be done, the body may not be left overnight. The Torah is concerned for the respect due to the human body and therefore it states that leaving a body hanging overnight is strictly forbidden.
Gur Aryeh
In view of everyone, and not outside of the encampment in the manner that other hangings are conducted (Gur Aryeh).
German Commentary
צוטריטלעך נאָר פֿאַר פּרעמיום־מיטגלידערEnglish Explanation of Mishnah Sotah
צוטריטלעך נאָר פֿאַר פּרעמיום־מיטגלידערGerman Commentary
צוטריטלעך נאָר פֿאַר פּרעמיום־מיטגלידערRashi
Until the rains fell on them. During the rainy season in Tishri. Their bones were not removed for burial. But is it not written, "His body should not remain [hanging] overnight"18Devorim 21:22. Why did Dovid let this happen?? However they reasoned that it is better that one of the letters of the Torah be uprooted in order that God's Name be publicly sanctified. Passersby would ask "Why have these people come to this fate?" They were told [in response], "They are royal sons." "What did they do [wrong]?" "They assaulted downtrodden foreigners." [The passersby] would say, "There is no people better to associate with then this people."19Yevomos 79a.