"And Shem and Japheth took" (Genesis 9:23). Therefore Shem merited the prayer-shawl (tallit) and Japheth the cloak (simlah). And for this reason the garments of Nadab and Abihu were not burned. And Sennacherib, who was of the descendants of the sons of Japheth, when the angel entered to burn them, did not burn their garments, as it is said, "And under his glory there shall be kindled a burning like the burning of fire" (Isaiah 10:16) — and what is "his glory" but his garments, for they honor him. And "a garment rolled in blood" (Isaiah 9:4). Gog, who is of the descendants of Esau, of Japheth, He grants him burial in the Land of Israel; but Egypt, who is of the descendants of Ham, of them it is said, "and with buttocks uncovered, to the shame of Egypt" (Isaiah 20:4), because he saw the nakedness of his father and told his two brothers outside, and was mocking his father.
Why Shem and Japheth Were Rewarded with Garments for Covering Noah
Midrash Aggadah, Genesis 9:23
ויקח שם ויפת. לפיכך זכה שם לטלית ויפת לשמלה, ולכך נדב ואביהוא לא נשרפו בגדיהם, וסנחרב שהיה מבני בניו של יפת, כשנכנס המלאך לשרפם לא שרף בגדיהם, שנאמר ותחת כבודו יקד יקוד כיקוד אש (ישעי י טז), ואיך כבודו אלא בגדיו, שהם מכבדים אותו, ושמלה מגוללה בדמים (שם ט ד), גוג שהוא מבני עשו של יפת נותן לו קבורה בארץ ישראל, אבל מצרים שהוא מבני חם, נאמר בהם וחשופי שת ערות מצרים (שם כ ד), לפי שראה ערות אביו ויגד לשני אחיו בחוץ והיה מלעיג על אביו: