I’m not claiming God actually said do those things, but men claiming to speak for God said to do it and believers acting on faith did it thinking they were doing the will of God.
When men like Moses defeated the Midianites, or when Saul defeated the Amalekites, these men speaking for God instructed their army to commit genocide against their fallen enemy. I see this as no different than what Hitler did against the Jews. Hitler in his Book Mein Kamph wrote how he was doing God’s work in his actions against the Jews. History is full of men speaking for God, instructing gullible believers to commit acts of evil.
I’m an Atheist; I don’t believe this God ever existed, I believe it was just a bunch of men who saw an opportunity to control a lot of people through religious beliefs. When those religious beliefs are used in acts of evil, and followers justify those acts of evil because of their faith, that is where my disagreement comes from