[Another interpretation:] (Psalms 92:13) "The righteous one shall flourish like the palm tree." This speaks about the tribe of Levi, whom the Holy One set apart on account of their good deeds. What is written after it? (Psalms 92:14) "Planted in the house of the LORD, in the courts of our God they shall flourish" — to teach you that they never stirred from the Temple, as it is said (Psalms 101:6), "My eyes are upon the faithful of the land [that they may dwell with Me; he who walks in the way of the blameless, he shall minister to Me]." Therefore it is said, "Planted in the house of the LORD," for the courtyard was never lacking them, as it is said, "in the courts of our God they shall flourish." What is the meaning of "in the courts"? This is what Scripture says (Psalms 65:5): "Happy is the one whom You choose and bring near, [that he may dwell in Your courts; may we be satisfied with the goodness of Your house, the holiness of Your Temple]." The Holy One said: Since they are My legions, go and number them. Therefore it is said (Numbers 3:15), "Enroll the children of Levi…"
Why the Tribe of Levi Flourishes Like the Palm in God's Courts
Midrash Tanchuma Buber, Bamidbar 17:4
[ד"א] צדיק כתמר יפרח מדבר בשבטו של לוי, שהפרישן הקב"ה במעשיהם הטובים, מה כתיב אחריו, שתולים בבית ה' בחצרות אלהינו יפריחו (תהלים צב יד), ללמדך שלא היו זזים מבית המקדש, שנאמר עיני בנאמני ארץ [לשבת עמדי הולך בדרך תמים הוא ישרתני] (שם קא ו), לכך נאמר שתולים בבית ה', שלא היתה עזרה חסירה מהם, שנאמר בחצרות אלהינו יפריחו, מהו בחצרות, זש"ה אשרי תבחר ותקרב [ישכן חצריך נשבעה בטוב ביתך קדוש היכלך (שם סה ה), אמר הקב"ה הואיל והם לגיונותי לך וספור אותם, לכך נאמר פקוד את בני לוי וגו'.