Numbers – 12 Spies and 10 Brothers
the Arizal (zt"l) explained that the very 12 leaders of the nation who embodied the sparks of the souls (nitzotzot) of the 12 sons of Yaakov (the tribes) were sent to spy out the land. The hidden meaning of their "mission" was that they were meant to rectify the sin of the 10 brothers who sold Yosef into slavery. After all, it was Yosef's sale that ultimately led to Yaakov's entire family moving to Egypt—in exile—and this mission was meant to mark the beginning of their return to the Holy Land. That is why the Torah says: "Send for yourself men to scout out the land of Canaan, which I am giving to the children of Israel"—that is, to the sons of Yaakov—Israel, whose souls were embodied in the 12 spies. But the spies not only failed to rectify the sin; they compounded it. Just as the 10 brothers failed to recognize the prophetic nature of Yosef's dreams, mistaking him for an ambitious man, so too the 10 spies were unable to discern the supernatural nature of the Land of Israel.
They described it as an ordinary country, with its own advantages and shortcomings. It is no coincidence that the gematria of the name Yosef equals the gematria of the word "Zion," which symbolizes the Land of Israel.
It is likewise no coincidence that when Yosef in Egypt first saw them, he called his brothers "spies": "You are spies; you have come to see where the country is vulnerable." (Bereishit 42:9)—this was a prophetic allusion to the future mission of the heads of the tribes.
Only our Moshe Rabbeinu, who knew the path of every Jewish soul, could flawlessly choose those men who embodied the souls of Yaakov's sons, and the Almighty confirmed that his choice was correct.
(Kavanot HaAri, Sha'ar HaGilgulim, Hakdama 36)