You answered your own question with that last sentence there, dude.
The Bible wasn't written by God, it was written by men who were writing about God, as they understood Him at the time. To them, since they had seen demonstrations of God's supposed 'wrath' before, it would have seemed very much the sort of thing He would do, ordering the mass murder of babies. God Himself had not changed, merely the men who wrote about Him's perspective of Him.
