"You shall appoint for yourselves" (Deuteronomy 16:18) — and not for the nations of the world. Another interpretation: "You shall appoint for yourselves." This teaches that the judges were called by the name of Moses. And this is one of three things over which Moses gave up his life, and they were called by his name. He gave up his life over the Torah, [as it is said, "And he was there [with the Lord] forty days and forty nights"] (Exodus 34:28), and it was called by his name, as it is said, "Remember the Torah of Moses My servant" (Malachi 3:22). He gave up his life over Israel, as it is said, "But if not, blot me out, please" (Exodus 32:32); and how do we know that they were called by his name? As it is said, "For your people have acted corruptly" (Exodus 32:7). He gave up his life over the judges, as it is said, "And he struck the Egyptian [and so forth], and he said to the wicked one, Why would you strike your fellow?" (Exodus 2:12, 13). Therefore they were called by his name, as it is said, "Judges and officers you shall appoint for yourselves in all your gates" (Deuteronomy 16:18).
Why Israel's Judges Are Called by the Name of Moses
Midrash Tanchuma Buber, Shoftim 4:1
תתן לך (דברים ט זיח). ולא לאומות העולם ד"א תתן לך. מלמד שנקראו הדיינין על שם משה, וזה אחד משלשה דברים שמסר משה נפשו עליהם ונקראים על שמו, נתן נפשו על התורה, [שנאמר ויהי שם [וגו'] ארבעים יום וארבעים לילה] (שמות לד כח), ונקראת על שמו, שנאמר זכרו תורת משה עבדי (מלאכי ג כב), נתן נפשו על ישראל, שנאמר ואם אין מחני נא (שמות לב לב), ומניין שנקראו על שמו, שנאמר כי שחת עמך (שם שם ז), ינתן נפשו על הדיינין, שנאמר ויך את המצרי [וגו'] ויאמר לרשע למה תכה רעך (שם ב י ביג), לפיכך נקראו על שמו, שנאמר שופטים ושוטרים תתן לך בכל שעריך.