Your question is the standard Muslim attack on the Old Testament. It shows a fundamental lack of understanding. The Bible is NOT the Qur’an. It is NOT the word-for-word uncreated word of God that was passed word-for-word to a prophet who recited the exact words (which–theoretically–were then written down). The Bible is revelation: God is communicating with man. But WHAT is He communicating?
You need to read two things (it would take 10 minutes). 1) Dei Verbum, a report of Vatican II. http://www.vatican.va/archive/hist_councils/ii_vatican_council/documents/vat-ii_const_19651118_dei-verbum_en.html 2) Sections 109 + 110 of the Catechsim. http://www.vatican.va/archive/ENG0015/_INDEX.HTM
They say the same thing in slightly different words. I will quote from the Catechism:
“In Sacred Scripture, God speaks to man in a human way. To interpret Scripture correctly, the reader must be attentive to what the human authors truly wanted to affirm and to what God wanted to reveal to us by their words.
In order to discover the sacred authors’ intention, the reader must take into account the conditions of their time and culture, the literary genres in use at that time, and the modes of feeling, speaking, and narrating then current. ‘For the fact is that truth is differently presented and expressed in the various types of historical writing, in prophetical and poetical texts, and in other forms of literary expression.’”
So let’s take one of your examples: God exterminates the Cananites. (Actually, the Lebanese are genetic descendants of the Cananites, so they weren’t exactly exterminated, but that’s another issue). What is the point of the story? What did God want to reveal to us? Murder is a good thing? Of course not. We should kill all our enemies? Of course not. So what is it? We should obey God. God will help us if we ask him. God will provide for us. These are the messages, and you could probably think of a few more. All the other stuff? Details. It makes a nice story. But it’s not an essential part of the message. So why put it in? “Conditions of their time and culture, the literary genres in use at that time, and the modes of feeling, speaking, and narrating then current.”
If someone were trying to give the same message today, he would tell an entirely different story. But it would be the same message. And that’s the point.
So instead of worrying about all the details–which don’t matter–you should ask yourself: “What is the point of this story? What is God trying to tell us?” And then use common sense.