Nor is Joshua's complaint in [chapter 7] verse 7 out of line. 'Alas, Lord Yahweh, why have you brought this people over the Jordan to give us into the hand of the Amorites to destroy us? Oh, that we had been content to stay on the other side of the Jordan!' This complaint is different from Israel's unbelieving complaints during the wilderness wanderings (Num. 14:1-3; Deut. 1:27ff). These are words of despair, not unbelief. Joshua complains to God in prayer; complaining to God is not the same as complaining about God (Israel's wilderness practice).
In his perplexity Joshua makes one basic appeal in his prayer (v. 9). His argument involves the peril of Israel and the honour of Yahweh. Israel's foes, Joshua prays, will cut off 'our name' and then what will you do for 'your great name'? If Israel perishes it will reflect on Yahweh's reputation. So-called refined Christians sometimes cringe at the thought of using such arguments in prayer. It seems so crass, they say. (Or does it merely seem too unsophisticated and childlike?) In any case, Matthew Henry is right: 'We cannot urge a better plea than this, Lord, "what wilt thou do for thy great name?" Let God in all be glorified, and then welcome his whole will.' There are times when the people of God today stand in solidarity with Joshua's Israel; that is, there are periods in which confusion strikes and we haven't any idea what God is about. We have no recourse but Joshua's - anguished prayer to a mystifying God, pleading both our danger and his honour.
From Dale Ralph Evan's 'No Falling Words' - expositions on the Book of Joshua, page 61