How to explain the atrocities in the Bible?
The following links should help answer your question. If you have any further questions, please contact Catholic Answers directly.
Why does God get nicer in the New Testament?
Is the God of the Old Testament warlike?
How to explain violence in Book of Numbers?