War was God's attempt to organize a new order based on His principles of justice and love, a land in which peace and security would prevail. Anything that could threaten the divine intention was to be removed. That God enlisted the Israelites as His instruments in this type of war raises moral and ethical concerns. Had God used the forces of nature, very few would feel that uncomfortable. But He used war.
War is an unavoidable characteristic of a fallen, sinful world.
By transforming Israel into a nation with political identity and by declaring Himself to be its king, God and His people were going to be involved in warfare. Their enemies would be other nations that were unwilling to recognize God's moral claim on them and would attempt to exterminate His people. We may not completely understand this topic, but there is one thing we know, namely, that God is loving, kind, and just. This biblical picture of God is essential in the discussion of a subject like this one. He is the one who allowed His Son to die in our place, the one who, in an act of love and justice, will exterminate sin and impenitent sinners from our planet in order to create a peaceful and eternal kingdom.