What most people miss in this biblical account is something which is consistently hidden or hushed over since the times of Noah... but the bible is pretty clear about it.
The reason God told Israel to utterly destroy (genocide) multiple tribes is the same reason He wiped out the earth with the flood.
It was not a judgment against men.
It was an eradication of the Nephillum blood line.
Nephillum are human/angelic hybrids.
Why did God tell them to wipe out all those tribes???
Simple... they were not human.
Furthermore... It was foretold by Jesus that the same incursion would occur again in the last days.