Our parasha concludes with Moshe Rabbeinu ascending Mount Sinai to receive the Tablets of the Covenant. Surprisingly, Yehoshua is mentioned together with Moshe:
"And Moshe arose, and Yehoshua his servant, and Moshe went up to the mountain of God." (Shemot 24:13)
Rashi wonders:
"I do not know what Yehoshua is doing here. But I say that the disciple escorted the teacher up to the place where the boundaries of the mountain were set — beyond which he was not permitted to go — and from there, Moshe ascended alone to the mountain of God."
Rashi draws the logical conclusion — the disciple went to accompany his teacher. And what happened afterward? Did the disciple perhaps return to the camp? Based on the continuation of the Chumash, Rashi proves that he did not:
"And Yehoshua pitched his tent there and waited there all forty days, as we find when Moshe descended, 'And Yehoshua heard the voice of the people as they shouted' (Shemos 32:17) — we learn that Yehoshua was not with them."
Yehoshua had no idea at all what was happening in the camp! From this we see that he waited for his teacher at the foot of the mountain for the entire forty days.
Indeed, Yehoshua's loyalty to Moshe is the central trait that characterizes him repeatedly throughout the Torah:
After the sin of the Golden Calf, when Moshe pitched his tent outside the camp, the Torah testifies: "And his servant Yehoshua bin Nun, a youth, did not depart from within the tent" — meaning, even though the natural place for a Jew is within the camp, Yehoshua was outside the camp, together with his teacher.
When Eldad and Medad prophesied in the camp, Yehoshua saw it as an affront to Moshe and rushed to defend his honor.
In the sin of the spies, the first to confront those who slandered the land was Calev. Yehoshua joined him only after the spies' words caused the people to complain against Moshe and Aharon.
Chazal add that manna descended for him privately, in the place where he stayed, during those forty days (Yoma 75b-76a).
It seems, therefore, that this was Yehoshua's central role in the Torah: Yehoshua's figure illuminates Moshe's figure as someone who has a person loyal to him until the end.
Looking at Tanach shows that this is a trait characterizing the righteous: they have friends loyal to them until the end.
Avraham Avinu had three friends willing to go out to war with him — Aner, Eshkol, and Mamre.
When Yehonason went up to fight the Philistines alone, he did not go alone. He had with him his armor-bearer. This was almost a mad action — two against many, from bottom to top. But his companion said to him: "Do all that is in your heart... behold, I am with you, as your heart is!"
When Dovid fled from Shaul, Yehonasan clung to him "for he loved him as his own soul" (Shmuel I 20:17). Later, when he fled from Jerusalem humiliated and despised, while all the elders of Israel followed Avshalom, there were still those who remained with David: a handful of loyal friends — Ittai the Gittite, Chushai the Archite, Barzillai the Gileadite. Good friends who revived him, literally providing him with food and water, protection, and companionship.
True, even the wicked sometimes have friends. But it is not true friendship that withstands the test. For example, Haman had his "lovers," but they loved him only as long as he was on top. The moment he fell, they were no longer called his lovers but his wise men; and then they did not encourage him but rather discouraged him: "If Mordechai, before whom you have begun to fall, is of Jewish seed, you will not prevail against him, for you will surely fall before him."
Similarly, in the story of Amnon and Tamar, Amnon had a friend named Yonadav son of Shima who advised him how to achieve his desire. But after Amnon died, Yonadav disclaimed responsibility and even justified the killing of Amnon.
We see that even when the wicked have friends, they are not true friends. I once heard from Rabbi Mordechai Auerbach in the name of Rabbi Simcha Bunim of Peshischa that we learn what true friendship is from the first true friend in the Torah — Yehuda's Adullamite friend who was willing to endure humiliations for him. A true friend is one who stands the test in time of trouble.
We have seen here that in Tanach, such loyal and courageous friendship is a clear characteristic of the righteous — and precisely of the righteous.
Chazal also extol the value of friendship. In Masechet Moed Katan, which deals with laws of mourning, the Gemara says that even for a friend one tears a great tear that is not sewn up, similar to tearing for a father and mother.
Although there are halachic opinions about this, see Shulchan Aruch Yoreh De'ah 340:8; and it seems that today we do not practice this way.
In Masechet Avos, one of the straight paths that a person should cleave to is "a good friend." And elsewhere they recommend "Acquire for yourself a friend."
In Avos de-Rabbi Natan we learn that friendship encompasses all areas of life:
It teaches that a person should acquire a friend for himself — to eat with him, drink with him, read with him, study with him, sleep with him, and reveal to him all his secrets: secrets of Torah and secrets of worldly conduct.
Avos de-Rabbi Natan, chapter 8
When we speak of friendship today, we usually mean a symmetrical relationship of friendship between people of equal status.
However, in the sources, the value of friendship is broader, and in fact, almost every relationship has an aspect of friendship.
For example, the Rambam sees the relationship between teacher and student as the most exalted type of friendship, which he calls "a friend of higher level." Moreover, even in the relationship between man and God there is a friendly dimension. The Gemara tells of a gentile who came to convert and wanted to learn the entire Torah on one foot. Hillel the Elder told him that the rule is "What is hateful to you, do not do to your friend." Rashi asks: How does this rule include the entire Torah? After all, there are many mitzvot between man and God! One answer Rashi suggests is that even the Holy One, Blessed be He, is called a "friend."
This is also true in marriage. When the prophet Malachi rebukes the men of Israel for taking additional wives over their original ones, he does not need to rely on any section in Shulchan Aruch. His words speak for themselves (Malachi 2:14):
"Yet you say, 'Why?' Because the Lord has been witness between you and the wife of your youth, against whom you have dealt treacherously, though she is your companion and your wife by covenant!" How can you betray your companion?!
[Translated from an article by R' Greenberg]