Of the 12 leaders sent to Israel to help prepare the people for their imminent entry into the land, only Yehoshua is previously known to us. He was Chief of Staff during the Jewish people's first war, when Amaleki terrorists attacked the women and children of Israel soon after the Exodus.
However, Yehoshua was not just a great military man, a trait that made him a most appropriate leader of the Jewish people when they eventually did enter the land of Israel. He was a spiritual giant, accompanying Moshe at Sinai. "And Moshe and his aide Yehoshua set out, and Moshe ascended G-d's mountain" (Shemot 23:13). He was also there forty days later, ready to assist Moshe as he descended from Sinai to the sight of the golden calf. Presumably, it was these displays of leadership that led to a name change (in the footsteps of Abraham, Sarah and Yaakov), with a yud being added to his original name, Hoshea. Our Sages, in fact, declared that the yud that was taken from the end of Sarai's name when it was changed to Sarah was the "same yud" that was added to the beginning of Yehoshua. Abraham and Sarah began Jewish history by leaving their homeland and going to the land of Israel; Yehoshua was the one to lead their descendants, as a nation, into that land.
According to many commentaries, Yehoshua's name had been changed much earlier—he is actually called by his "new" name in the above mentioned instances—but the Torah first records it here, as he readied himself to join the scouting expedition to Israel. Strangely, our Sages view this name change, as it is mentioned here, in a negative light. Moshe's addition of the letter yud, making the first two letters of his name equivalent to one of the possible spellings of G-d's name, is said to have been meant as a prayer that "G-d should save you (Hoshea) from the advice of the meraglim".
It appears that Moshe had a pretty good premonition of what was in store for this doomed mission, yet he did not want to abort it. If the Jewish people were going to be able to enter the land of Israel, he reasoned, they would need a team of inspirational leaders. The spoon-feeding that they received in the desert—free food, drink, housing, clothing and the like—was going to have to give way to the hard work of building a new nation. G-d would no longer provide for them with nothing required. The mission of the meraglim was a most necessary test of the readiness of the Jewish people to establish a State. While Moshe had a hunch that they were not yet ready, he understood that he must send them in any case. Knowing the risks involved, he hoped and prayed even more that the mission would be a success.
It was this fear that led him to pray for Yehoshua especially. "Amalek lives in the Negev area" was one of the opening salvos of the meraglim. By invoking fears of the dreaded Amalek, the meraglim hoped to dissuade the Jewish people from entering the land. Living in Israel, they not-so-subtly explained, would mean ongoing wars and terrorism. Yehoshua, as the one who led the successful battle against Amalek just a few months earlier, was the key to a successful mission. That first battle took place in the desert, but fighting them on their own territory might be a different story. Urban warfare is never easy.
As the Meshech Chochma so brilliantly points out, it was crucial to morale that Yehoshua, at least, did not succumb to fear. If our highest-ranking military officer said that Amalek could not be defeated, then the battle truly was lost.
Moshe's best hope for a successful mission rested in the ability of Yehoshua to convince his colleagues that, with proper preparation and G-d's help, they could conquer the land "flowing with milk and honey" (13:27). Alas, this was to be an impossible task. Our Sages, commenting on a textual anomaly, note that the meraglim basically had their minds made up even before they left on their mission. Their unwillingness to see things from a different perspective when they visited the land doomed the nation to years of wandering (perhaps generations of wandering, as many of our commentaries claim). May we merit, like Yehoshua, to see G-d in front of all of our names; a G-d who demands that we take the first step of our journey, but is always there to support us.