Yahweh left nations to test Israel to teach warfare to the new generation of the Israelites who had not known it before.