That is an obvious evasion. How is god good if he ordered the massacre of babies?
Ah, cofty, I just had an insight....perhaps the purpose was to instill fear and create a maniacal dread of YHWH in the surrounding nations by making appear to be the most bloodthirty and ruthless person possible, all powerful and willing to destroy your entire nation for spite and to make all others cower in fear and surrender without a fight before the mere mention of your name. Once the Romans proved that the Jews and therefore their god was NOT indominable, however, they switch to free love and hippie spirituality.
He was originally supposed to rule by fear and when that ulitmately failed, love took it's place.
Unless of course, my zombie uprising theory is correct.