Parshat Shelach In Memory of Shimshon Ben Shalom
אֵ֚לֶּה שְׁמ֣וֹת הָֽאֲנָשִׁ֔ים אֲשֶׁר־שָׁלַ֥ח מֹשֶׁ֖ה לָת֣וּר אֶת־הָאָ֑רֶץ וַיִּקְרָ֥א מֹשֶׁ֛ה לְהוֹשֵׁ֥עַ בִּן־נ֖וּן יְהוֹשֻֽׁעַ׃
Those were the names of the participants whom Moses sent to scout the land; but Moses changed the name of Hosea son of Nun to Joshua.

Let us see in the Targum below (how he adds the fact that Moses changed his name due to Joshuahs high level of humility)

אִלֵין שְׁמָהָן גוּבְרַיָא דְשָׁדַר משֶׁה לְאַלְלָא יַת אַרְעָא וּכְדִי חֲמָא משֶׁה עִנְוָותָנוּתֵיהּ קָרָא משֶׁה לְהוֹשֵׁעַ בַּר נוּן יְהוֹשֻׁעַ

These are the names of the men whom Mosheh sent to explore the land; and when Mosheh saw his humility, he called Hoshea bar Nun Jehoshua.

And Rashi comes to teach us that he changed his name to protect him from the advise of the spies -

ויקרא משה להושע וגו'. הִתְפַּלֵּל עָלָיו יָהּ יוֹשִׁיעֲךָ מֵעֲצַת מְרַגְּלִים (סוטה ל"ד):
ויקרא משה להושע וגו׳ AND MOSES CALLED HOSHEA [THE SON OF NUN JEHOSHUA] — By giving him this name יהושע which is a compound of יה and הושע “God may save”, he in effect prayed for him: “May God save you from the evil counsel of the spies” (Sotah 34b).

A suggestion of why Moshe reasoned the need to try and protect Joshua, specifically after noticing how humble of a man he was is the following. Let us first contemplate, if Moses already knew that the spies would come back with slander regarding the land, and he knew that Joshua is righteous in his ways, therefor he had to pray for him not to fall into the trap of the thought process of the spies. If so, now after the story we see that Caleb was also together with Joshua as the two people who did not fall into the trap of the spies, so to just like Moses prayed for Joshua, he should have also prayed for Caleb, so why did he only pray for Joshua to be spared, when both of them ended up getting spared?

Let us say and preface with a verse that comes later on -

(כב) וַיַּעֲל֣וּ בַנֶּ֘גֶב֮ וַיָּבֹ֣א עַד־חֶבְרוֹן֒ וְשָׁ֤ם אֲחִימַן֙ שֵׁשַׁ֣י וְתַלְמַ֔י יְלִידֵ֖י הָעֲנָ֑ק וְחֶבְר֗וֹן שֶׁ֤בַע שָׁנִים֙ נִבְנְתָ֔ה לִפְנֵ֖י צֹ֥עַן מִצְרָֽיִם׃

(22) They went up into the Negeb and came to Hebron, where lived Ahiman, Sheshai, and Talmai, the Anakites.—Now Hebron was founded seven years before Zoan of Egypt.—

And on this verse, when it says they came to Hebron, Rashi writes the following -

ויבא עד חברון. כָּלֵב לְבַדּוֹ הָלַךְ שָׁם וְנִשְׁתַּטֵּחַ עַל קִבְרֵי אָבוֹת שֶׁלֹּא יְהֵא נִסָּת לַחֲבֵרָיו לִהְיוֹת בַּעֲצָתָם, וְכֵן הוּא אוֹמֵר (דברים א'), "וְלוֹ אֶתֵּן אֶת הָאָרֶץ אֲשֶׁר דָּרַךְ בָּהּ", וּכְתִיב (שופטים א') "וַיִּתְּנוּ לְכָלֵב אֶת חֶבְרוֹן" (סוטה ל"ד):

ויבא עד חברון [AND THEY WENT UP BY THE SOUTH] AND HE CAME UNTO HEBRON — Caleb alone went there and prostrated himself on the graves of the Patriarchs, offering prayer that he might be helped not to give way to the enticement of his colleagues and join them in their counsel...

Based on the above we can see that Moses knew with the Holy Spirit that the merit of Caleb will protect himself, through the fact that he visited the graves of his ancestors in Hebron, and poured out his heart with supplication to be saved from the spies and their planning, therefor there was no need for Moses to pray for him.

Yet we still have a question. If Calebs prayers by his ancestors were enough to protect him, then why did Joshua need the prayers of Moses to keep him safe, couldn't he just do like Caleb did and pray in Hebron, and subsequently be saved like Caleb?

And we can say an answer by starting with the words of the Holy Rabbi, Rebbe Dov Ber of Lubavitch, may he be remembered for eternal life, and these are his words -

"When one is going to the graves of the righteous and holy, one can come to great embarrassment and total self negation through his embarrassment from all of his actions and thoughts that he has thought of and done until today - since they are all revealed, because the righteous, even when they are alive they know the thoughts and tribulations of man, even more so, the soul of the righteous knows this after his passing."

If this is so, Moses was suspect that Joshua wouldn't go to suplicate and prayer by the graves of his ancestors due to his extreme humility, that Joshua would not see himself as worthy of his prayers working. So Moses thought he would not have the same merit of protection that Caleb would have, therefor he felt it necessary to pray for Joshua.

And this is why the above Targum came to teach us specifically why Moses prayed for Joshua and not for Caleb, and this is what it was saying - Once Moses saw the humility of Joshua, he was worried for him specifically due to his humility that he would not pray for himself at the graves of his ancestors in Hebron, so Moses had to pray for him.