The fall of Adam and Eve left man in tremendous disarray. Subsequently, paganism in its most barbaric forms was rampant. In turn, God established the Jews as his chosen people. He did this to prepare man for belief in the one true God and to prepare the way for the promised redeemer, Jesus.
Even though the Jews were rescued from Egypt via the miracles of the seven plagues and even crossed the Red Sea by way of a miracle they still drifted into idol worship. This is an incredibly serious offense against God. Their unfaithfulness had consequences and the Jews were forced to wander in the desert for forty years. The social, cultural, and political structures that were in place within the societies surrounding the Jews frequently influenced them in pagan ways. Even after being established in the promised land, they would sometimes fall prey to idol worship.
The pagans believed that their pagan gods would lead them to victory in battle. The Jews depended on the one true God, Yahweh. The consequences of God sending the Jews into battle against their spiritual, economic, and political enemies served multiple purposes. Primarily, Yahweh sent the Jews against their enemies to demonstrate that He was the one true God before whom all knees must bend. Pagan idolatry and the extremely evil pagan practices were to be utterly defeated as an important demonstration to both the Jews and the pagans that there is no God but Yahweh.
This process may seem a bit extreme by modern western standards, but primitive peoples thought in primitive ways. Idolatry, which sometimes included human sacrifice and other extremely debased practices, was to be defeated. God as creator has all rights over man. In the justice of God, the evil pagan practices and idol worship were deserving of death.
Conversion was apparently not an option with ancient OT societies. A clear example of this occurred when God gave Pharoah numerous opportunities to recognize him and to let his people go. Pharoah, however, thought himself to be a god and hardened his heart. Even after letting the Israelites go, he later sent his army in pursuit only have it perish in the Red Sea.
It would appear that the many battles that Israel engaged in were necessary in serving God’s purpose to prepare the Jews and mankind for the coming of the savior. We cannot see clearly how all of this was done or why so much violence was necessary. Likewise, we do not have the experiences of the OT Jews to really appreciate what God did and why.
I hope this helps to shed a small amount of light on a complex subject.