Rabbi Abba bar Kahana said: why was its name called Luz? Because everyone who entered it sprouted commandments and good deeds like an almond tree [luz]. The rabbis said: just as a luz [almond, or hazelnut] has no opening, so no person could find the opening to the city's gate. Rabbi Ishmael says: a luz tree stood at the entrance of the city. Rabbi Elazar in the name of Rabbi Pinchas says: a luz tree stood at the entrance of a cave, and the luz was hollow, and they would enter through the luz into the cave and through the cave into the city, as it is written, "Show me, I pray, the entrance to the city" (Judges 1:25).
Why the Hidden City Was Named Luz the Almond
Yalkut Shimoni on Nach 38:6
אמר רבי אבא בר כהנא למה נקרא שמה לוז שכל מי שנכנס בה הפריח מצות ומעשים טובים כלוז. רבנן אמרי מה לוז אין לה פה כך לא היה אדם יכול לעמוד על פתחה של עיר, רבי ישמעאל אומר לוז היה עומד על פתחה של עיר. ר' אלעזר בשם רבי פנחס אומר לוז היה עומד על פתחה של מערה והיה הלוז חלול והיו נכנסים דרך הלוז למערה ודרך המערה לעיר דכתיב הראני נא את מבוא העיר: