Yehoshua bin Nun sent from Shittim two men as spies. (Haftarah)
It’s hard to understand why Yehoshua sent spies to Yericho. Spies are useful for ordinary warfare. Yericho was not conquered by war at all, but by a total miracle from Heaven. So what was the point in sending spies?
There is a story in Tanach that the king of Aram wanted to capture Elisha, so he sent a platoon to surround the town where Elisha was. Elisha’s assistant was afraid of the soldiers. Elisha showed him horses and fiery chariots on the hilltop and said: “Fear not, because those with us are more numerous than them.” In the end, they were saved in a totally different way.
Here, too, what was the point in the horses and fiery chariots that Elisha showed his assistant, if their salvation came a different way altogether?
R. Chayim Shmuelevitz explained that this teaches us a principle: miracles do not occur when people are afraid. Since the assistant was afraid, the miracle to save them could not take place. This is why Elisha first needed to remove his assistant’s fear, and then Hashem saved them a different way.
This answers our question as well. The Jewish people were afraid of the Canaanites. In such a situation, Hashem will not perform miracles to save them and conquer Yericho for them. So Yehoshua needed to send spies in order to remove their fear.
When the spies came back and reported that the Canaanites are terrified of the Jews, this caused the Jews not to fear, thereby enabling the miracle to take place.