God spoke to Moses, saying, "Send out men for yourself to explore the Canaanite territory..."
Out of love for the Land of Israel - which represents the spiritual essence of Rachel – Moses sent out the spies from the Generation of the Desert, who represented the spiritual essence of Leah. He wanted to connect the two. The spies were not successful in their mission, and only by their death they achieved the correction Moses had intended.
When Joseph told his brothers, “You are spies!”, he was hinting at this episode. The brothers' souls have connected themselves to the spies, in order to help them not to go completely bad. That is why the Torah calls the spies “Princes of the sons of Israel” - to hint that this is who they were. A soul can reincarnate in a person, and that connection is permanent, or it can attach itself to someone for a specific mission, and that connection depends on the person's deeds. When the spies gave bad report about the Land of Israel, the souls of Joseph's brothers departed from them.
The two spies who said only good things about Israel were Joshuah and Caleb.
Moses sent Joshuah in his own place, and the soul of Levy was attached to him. Moses himself could not go, because he was from the tribe of Levy, who anyway did not have a portion the Land, and thus had no need to spy it out.
Caleb was the reincarnation of Eliezer the servant of Abraham. Eliezer was from the cursed nation of Canaan, but when he arrived to the house of Rebecca and was told “Come, blessed of God,” he corrected his origin and became blessed. The soul of Judah attached itself to Caleb for this trip, and it did not leave him, that is why Caleb and Joshuah are called “Those who remained alive.”
Art: Aert De Gelder - Joseph weeping in his room, his brothers beyond