“A well that the princes dug, that the nobles of the nation excavated, through a lawgiver with his staff; from the desert (midbar) a gift (matanah), and the gift went with them to the valley (nachliel) and from the valley to the heights (bamos).” (21:18
This cryptic song that the Jews sang on their journey is interpreted by the Rabbis as a song about Torah study. If one makes himself “ownerless” like the desert (midbar), he will be given the Torah as a gift (matanah). Once he receives the Torah he will acquire an inheritance with Hashem (nachliel), and then he will be raised on high (bamos).
What is the idea of making oneself ownerless regarding Torah? When one wants to relinquish ownership of an object he can say “This object is hefker—ownerless.” But it still belongs to him until someone acquires it. The lesson is this: a Torah teacher should not just throw out the concepts and let his students hopefully pick them up. He should be holding on to them until the students can actually understand enough to take the lessons on their own.
Another meaning of the metaphor is this: One should make himself hefker—available to all to teach Torah no matter what the students stature. If he has that type of humble attitude he will receive Torah as a gift (matanah).
Once he receives this special gift he will “inherit” the Torah. That is, the Torah that he creates will be considered his—intrinsic and permanent.
At this stage, having received an inheritance of Hashem, he will receive special Divine assistance to protect him from sin, and he will come to proper conclusions in Halacha. This is what is meant by being “raised up high” (bamos). (Zera Shimshon)