Bamidbar / Numbers 13:2 · Drash
שְׁלַח־לְךָ אֲנָשִׁים וְיָתֻרוּ אֶת־אֶרֶץ כְּנַעַן אֲשֶׁר־אֲנִי נֹתֵן לִבְנֵי יִשְׂרָאֵל אִישׁ אֶחָד אִישׁ אֶחָד לְמַטֵּה אֲבֹתָיו תִּשְׁלָחוּ כֹּל נָשִׂיא בָהֶם׃
"Send for yourself men, and let them scout out the land of Kenaan (Canaan), which I am giving to the children of Israel. One man for each tribe of his fathers you shall send, every one a leader among them."
Drash דְּרָשׁ
They were righteous
A person can be worthy when chosen and change on the way. Does that mean the choice was a mistake?
Midrash Tanchuma: wherever Scripture says "men" (אֲנָשִׁים), it means righteous men. The scouts were chosen from all of Israel by the word of the Holy One, blessed is He, and by the word of Moshe (Moses), and Moshe asked about each one, and the Eternal answered: "They are worthy." But after forty days they turned around and brought disaster on the whole generation. That is why they are called fools: not because they were foolish, but because they made themselves fools by spreading an evil report about the land.
How Midrash Tanchuma (Buber) explain it
Midrash Tanchuma (Buber) Send for yourself men
Wherever it says "men," they are righteous, for it says: "And Moshe said to Yehoshua (Joshua): 'Choose us men'" (Shemot / Exodus 17:9), and it says: "And the man was old in the days of Shaul (Saul), advanced in years among men" (Shmuel I / I Samuel 17:12), and Channah (Hannah) says: "And give Your maidservant offspring of men" (Shmuel I / I Samuel 1:11). And these you call fools: "He sends words by the hand of a fool" (Mishlei / Proverbs 26:6)? They were called fools only because they spread an evil report about the land, as it says: "And one who spreads a report is a fool" (Mishlei / Proverbs 10:18). And even so they were great men, and they made themselves fools. About them Moshe says: "For they are a perverse generation" (Devarim / Deuteronomy 32:20). They were chosen from all of Israel by the word of the Holy One, blessed is He, and by the word of Moshe, as it says: "And the thing pleased me, and I took of you" (Devarim / Deuteronomy 1:23). From here you learn that they were righteous in the eyes of Israel and in the eyes of Moshe. And even Moshe did not want to send them until he consulted the Holy One, blessed is He, about each one: so-and-so of such-and-such tribe. And the Holy One, blessed is He, said to him: "They are worthy," as it says: "And Moshe sent them from the wilderness of Paran by the word of the Eternal, all of them men, heads of the children of Israel" (Bamidbar / Numbers 13:3). And afterward, at the end of forty days, they turned around and caused all that trouble, and they brought it about that that generation was struck with that blow, as it says: "For they are a perverse generation," for they were found righteous and turned around. That is why it says: "Send for yourself men."
Takeaway
The midrash plays on Moshe's words "a perverse generation" (תַּהְפֻּכוֹת), from the root "to turn over": righteous men turned over and became different.
Forty days is the time the scouts walked through the land (Bamidbar / Numbers 13:25).