The verses you quoted are a punishment on Israel for their sins. What you failed to post was...
In the book of Hosea, God tells his prophet Hosea to marry a prostitute. She leaves Hosea several times and goes and sells herself back into a life of prostitution. Each time God tells Hosea to go buy her back and love her as his wife. It is an allegory of the way God loves Israel and the way Israel treats God.
But God is a God of both Mercy and Judgement. He will not let unrepentant sin go unpunished. But He will extend mercy to those who are repentant.
That's why Atheist are more moral then the fundamentalist. Fundamentalist will justify/excuse any atrocity as long as it is done in the name of God.
For example,
Committing genocide (Which of course includes killing little boys and pregnant women), human sacrifice, and taking little virgin girls as sex slaves as done in the book of Numbers chapter 31, Same with summoning the power of God to summon 2 bears to maul 42 children like Elisha did just because they called him "baldhead" in 2nd Kings chapter 2 or killing 70,000 people because the king took a census of the army in 2nd Samuel 24 and the stuff that is just so vile and evil in 2nd Samuel 11 and Judges chapters 19-21 it is beyond my ability to describe it. And I am sure you know that's only the tip of the iceberg I could go on and I bet you already have built in justifications for all of them.
I look at all that and find it disgusting, The killing of innocent children, Genocide, Human sacrifice, etc. are not justified under any circumstance, I don't care what your God says, They are EVIL and people who do them are not to be praised and/or made excuses for.