The Chasam Sofer (Shu"t O.C. 12) discusses whether a Rabbinic should be inherited by a son after his father's passing. He cites a Midrash from our parsha:
יפקד ה' מה ראה לבקש הדבר הזה אחר סדר נחלות? אלא, כיון שירשו בנות צלפחד אביהן, אמר משה: הרי השעה שאתבע בה צרכי, אם הבנות יורשות, בדין הוא שירשו בני את כבודי. אמר לו הקב"ה (משלי כז): נוצר תאנה יאכל פריה, בניך ישבו להם ולא עסקו בתורה, יהושע הרבה שרתך והרבה חלק לך כבוד, והוא היה משכים ומעריב בבית הועד שלך, הוא היה מסדר את הספסלים והוא פורס את המחצלאות, הואיל והוא שרתך בכל כחו, כדאי הוא שישמש את ישראל, שאינו מאבד שכרו. קח לך את יהושע בן נון, לקיים מה שנאמר: נוצר תאנה יאכל פריה:
Then Midrash explains the relationship between the adjacent parshiyos of Bnos Tzlafchad and the appointment of Yehoshua. When the parsha of inheritance was taught Moshe thought that it would apply to his position as well and his own children would inherit his role. Hashem responded that Moshe's role would pass to Yehoshua who toiled in learning and shimush for years to deserve it, but not his children. A Rabbinic position belongs to the most worthy candidate, not to the offspring of the previous occupant of the position (other Achronim take issue with the Chasam Sofer's conclusion).
The Chasam Sofer's interpretation sheds light on Moshe's hava amina. It was not nepotism that motivated Moshe; it was a halachic concern based on the laws of inheritance.
I would like to suggest another possible approach. Moshe Rabeinu must have known that Yehoshua was the only true possible successor to his position of Rabban of Klal Yisrael. However, Moshe also knew that after his death the people would need to wage a war of conquest. What they needed in a leader, he assumed, was not a Rosh Yehsiva, but rather a general -- a charismatic commander who appreciated the real art of war, not just milchamta shel Torah. Moshe perhaps felt that that role could be filled by his own children.
If I am right about the hava amina, what is the maskana? One can read the conclusion simply as revealing that Moshe's assumption about the changed role of leadership was wrong; a Rosh Yeshiva and not a general as the primary leader was still necessary. Yet, one can also read the conclusion as accepting Moshe's premise that the nature of leadership would change; a general, not a Rosh Yeshiva, would lead the people. However, the Midrash teaches that a general of the army of the Jewish people should be no less steeped in the values of Torah than a Rosh Yeshiva.
Reading the debates in responsa literature regarding whether a Rabbinic position is like the title of king and may be inherited strikes me as odd and naive given the way modern shuls are run. If anything, it is the shul president and board of directors who wear the crowns -- maybe things were different in the old days. Given the reality of our circumstance, I think the lesson of our Midrash is even more compelling. As Moshe anticipated, our organizational leadership is concerned with practical details: who is getting food for the kiddush? Do we have enough in the bank for the air conditioning bill and if not, how can we raise it? What kind of youth program can we run? etc. Even though these roles do not demand the genius of a talmid chacham to fill, I think there is a danger in turning them over to people who are not of the world of the beis medrash and do not necessarily share its values. Dollars certainly are needed to run any organization, but too often they become the raison d'etra instead of just a means to an end. The Midrash highlights not just Yehoshua's learning, but notes that he straightened the chairs and made sure the beis medrash was in order; he was concerned with the practical as well as the other-worldly. Organizational leadership demands the vision to meet the necessities of this world while never losing sight of more spiritual goals.