The commander of the Lord's army is closely identified with the Lord himself and he makes it clear in his response to Joshua’s question that he is not here to push any tribal or human agenda. The Lord is not on Israel’s side as if he exists primarily to fulfill the ambitions and desires of sinful people. He is their God yes, but he is not their genie. He has his own plans and purpose and they always come before any human agenda.
The presence of the commander is certainly meant to assure Joshua that the Lord is fighting on behalf of his people, but he is also a reminder that the battle of Jericho is ultimately the Lord’s battle. The fight for Canaan is a battle which the Lord has initiated. He wants to bring his people into this Promised land. Jericho will not be conquered by human might or weapons, the Lord will deliver the city into the hands of his people.
13 When Joshua was by Jericho, he lifted up his eyes and looked, and behold, a man was standing before him with his drawn sword in his hand. And Joshua went to him and said to him, “Are you for us, or for our adversaries?”