Ramban (Job 36:7): He doesn’t withdraw His eyes from the righteous. … Because most of the world is intermediary between the totally righteous and the totally wicked, the Torah commanded that soldiers be utilized for defense and that a priest be anointed for war. This priest is to reject soldiers who are afraid and would therefore undermine the courage of the others. We also find in the Torah and Prophets that battles were conducted on the basis of careful battle tactics. For example Dovid asked G d about the battle and he was told: Do not go up. Rather you should circle around behind them … And draw them to Mt Tabor and take ten thousand men with you. If they really had been meritorious they could have gone out to battle with a few people and been victorious without any weapons. If they had deserved defeat than no amount of soldiers would have helped. In this case they had to fight the battle in a totally natural way. This matter is explained well by the Rambam (Moreh Nevuchim 3:18 and 3:50).
Ramban (Bamidbar 13:2): When the Jewish people requested that spies be sent out to know the roads to the cities in the normal manner of military conquest and that they obtain information as to which city to attack first and which side to start the attack - all this was totally appropriate to do. In fact we see that Moshe himself sent out spies later (Bamidbar 21:32) and Yehoshua did also (Yehoshua 2:1). Thus this request was received favorably by Moshe since one is not to rely on miracles but when engaged in warfare it is necessary to carefully plan strategies and tactics. We see this also in the conquest of the city of Ai in which G d Himself commanded that the conquest be done by ambush. We see this in many places. Therefore Moshe consulted with G d concerning the spies and was given permission to send them to obtain information on how to proceed with the conquest.