What was the purpose of the test of the staffs?
Rashi (on Pasuk 25) and Rashbam: To prove that Hashem had chosen the Kohanim to serve in the Mishkan. 1
Ramban and Moshav Zekenim: To prove that Hashem had chosen the tribe of Levi 2 to serve in the Mishkan. 3 (Since the B'choros were complaining about this - Moshav Zekenim [on Pasuk 18, citing R. Yehudah ha'Chasid]).
Oznayim la'Torah: a.To prove that Hashem had chosen the tribe of Levi to serve in the Mishkan, and b. following their complaint that Moshe had killed the two hundred and fifty men, to confirm that Aharon was the Kohen Gadol. 4
Pasuk 23 specifically writes "le'Veis Levi" in support of the Ramban.
Oznayim la'Torah: Which explains why Moshe wrote Aharon's name on his staff and not 'Levi'.
Since there was also a staff for the tribe of Levi, why were there only twelve staffs?
Ramban and Moshav Zekenim: Because Yosef was counted as one tribe. 1
Ramban and Moshav Zekenim: Since Yisrael are always counted as twelvr tribes - never thirteen. Consequently, whenever Levi is counted, Efrayim and Menasheh are counted as one tribe - and whenever Levi is counted, Efrayim and Menasheh are counted as one tribe)/
What, exactly, was written on each staff?
Ramban #1 (citing some commentaries): The name of the tribe 1 - Reuven, Shimon, Levi ...
Ramban #2: The name of the Nasi of the tribe - hence on Levi's staff they wrote 'Aharon'.
"Sh'mo" implies the Nasi's name! And Pasuk 18 explicitly says Aharon's name! Presumably, this is why the Ramban prefers to say the name of the Nasi. (PF)
QUESTIONS ON RASHI
Rashi writes that this was to prove that Hashem had chosen the Kohanim. This was not needed. Korach and his congregation, who were Levi'im, died for requesting Kehunah. Only Aharon offered Ketores and lived!
Hadar Zekenim (on 16:5): They complained that only Aharon had a Kadosh incense pan. Now they will see that even Aharon's staff, which is Chulin, will sprout.
Ramban (on Pasuk 25): Perhaps Rashi agrees that the staffs proved that Levi was the chosen tribe, and once Levi was chosen, it followed automatically that Aharon, who was the Nasi of the tribe, was the Kohen Gadol. 1
See Ramban's objection to his own suggestion.
Rashi writes that this was to prove that Hashem had chosen the Kohanim. How is this a proof? Perhaps also if another Levi had give his staff, it would also have sprouted!
Refer to 17:17:1:2.