Why does God kill innocent people in the Old Testament?

How can God order the genocide or the killing or the wiping out of a complete nation, including babies and women and seemingly innocent children. This idea comes from several passages in the Old Testament one of which is found in 1 Samuel 15:3 which reads “Now go and strike Amalek and devote to destruction all that they have. Do not spare them but kill both man and woman, child and infant, ox and sheep, camel and donkey.”

There are several things here that we need to address. We need to understand that these nations were extremely wicked. They weret involved in things such as bestiality, incest, child sacrifice, sacrificing their children in the fire and so God knew that these nations were very wicked. In his sovereignty, he chose to use Israel as his chosen instrument or tool to purge the earth of the evil that these nations were doing. One reason was because God knew that if he did not do so, then these surrounding nations would then influence his chosen people to do likewise.

Another point that we have to ask here is: it may not have been genocide because there are scriptures in the Old Testament that suggests that God is able to preserve people who were righteous and pull them out of a group of people who were wicked.  Notice in 1 Samuel 15 that there was a group of righteous people called the Kenites and they were surrounded by the wicked nation of the Amalekites and Saul sent this message to the Kenites: “Move away from where the Amalekites live or you will die with them. For you showed kindness to all the people of Israel when they came up from Egypt so the Kenites packed up and left.” (1 Samuel 15:6). We see this happening also in the Book of Genesis with the wicked nation of Sodom and Gomorrah with Abraham. When Abraham pleaded to God “God, it doesn’t seem fair that you’re going to kill righteous people with the wicked. If I can go into the city of Sodom and Gomorrah and find even 10 righteous people, God will you spare the city?” and God said “Yes, if you can find 10 righteous people, I’ll spare the whole city” and Abraham was not able to find them.

But you may say “What about the innocent babies? How can a good God look at a beautiful little cute baby and then just kill it and destroy it and never give it a chance to live?” Speaking of these Amalekites, God said this “They have raised their fists against the Lord’s throne so now the Lord will be at war with Amalek generation after generation.” (Exodus 17:16) In other words, God, because he was all-knowing, he had foreknowledge to know that these babies were going to one day grow up and hinder God’s plan and continue to attack God’s people. Let’s say you, as a loving father, had foreknowledge and insight to know that this cute innocent baby would one day grow up and kill your precious son or daughter, would you not as a loving father do all that you could at all cost to protect the safety in the life of your children? In the same way, God knew that this nation was evil and would continue to stand in the way of his plan so in his sovereignty, God decided to destroy them completely.

In addition to this, these babies actually ended up in a better place because if they had continued to live and continued to carry out that evil, they would have spent eternity apart from God. Because they had not reached what the theologians call the age of accountability (i.e. not old enough to make a decision to follow God), the Bible seems to teach and suggest that all babies go to heaven, which means that their fate and their eternal destiny was better off than it would have been if had they have lived.