Oh really? If the patriarchs lived all those hundreds of years, their descendants must have numbered in the millions by the time of the Flood. Are we to believe there were no infants at all in that drowned multitude?
What about the Israelites God slaughtered by the thousands because David took a census that God himself ordered him to take? Where was their guilt? Or the Amalekites God ordered Saul to slaughter because of what their ancestors did in opposing the invasion of hordes of foreigners who wanted to kill their men, women, and boys, keep their virgin daughters for themselves (as in Numbers 31:18) and burn their cities (how wicked of them to oppose the will of God that they should be exterminated)? But why do I waste my time? Faith cannot be cast down by reason because it is not built up by reason. It is the arbitrary will to believe no matter what.
Again, I am going to point you back to the idea of Salvation History. You are looking at each of these instances and lone, isolated incidents, and therefore you are failing to see the larger picture. If God did not exist and the Bible were merely a historical account, yes, the actions taken appear evil, or as you claim, Israel explaining away past aggression towards neighboring peoples. But since God does exist (you might argue otherwise) and His purpose with us is to lead us to salvation I believe that God’s actions and the actions of His people by His command were done for the sake of mankind.
Now let me address (with aid from
bible.org) your understanding of the incidents you listed:
David and the census: Satan provoke David, through pride, to number the people which offended God (1 Cronicles: 21). God did not order it. God cannot contradict His own nature so it wouldn’t make sense that He order David to do something and then punished him (and others) for it.
Saul and the Amalekites (or any other such example): "First, there are general reasons for the annihilation of peoples like the Canaanites. These are the peoples who possess the promised land which God gave to Israel. The primary reason stated above is that these peoples are exceedingly wicked. If they are not totally wiped out, they will teach the Israelites their sinful ways and thus bring them under divine condemnation. It is easy to see why all the fighting men of the enemy should be killed, but why the women, children, and cattle? The sin of the Canaanites involved had defiled and corrupted their animals, and God would not allow any to survive.
Secondly, those whom God orders annihilated are those who are guilty, those for whom their punishment is just retribution. While their predecessors may have sinned greatly, the people whom God orders Saul to destroy are guilty sinners themselves, for whom their fate is a just recompense:
Third, we are reminded that God does not take pleasure in the punishment of the innocent:"
In short… Israel is God’s chosen people, other peoples denied God and His laws, God gave Israel specific land, the other peoples repeatedly attacked and invaded Israel, the other peoples were completely wicked because they rejected God, God enacted his justice against the enemies of His chosen people (through angels, plagues, men, etc.)