First of all nowhere in the Bible does it say that the Bible is the Word of God. What is does say is that Jesus Christ is the Word of God, John 1:1 and following.
Now for the Bible to be the Word of God, then Jesus Christ and the Bible must be the same thing, which they are not. The Bible did not die on the Cross for our salvation. The Bible is not the Second Person of the Trinity.
In other words there is nowhere in the Bible where it says that the Bible is God, therefore when God commanded us in the First Commandment to have no other gods before God then God included the Bible as one of those false gods. The Bible is not wrong, but when we use bad theology to make the Bible something it is not, that is, the Absolute Word of God, we abuse the Holy Spirit.
I am not absolutely sure, but this sounds like a quote that an atheist used some time ago on me to say that YHWH condoned the use of captive women as sex slaves. After some careful research which was not easy because it was not always clear what was going on in this unclear history of the Hebrews, the fog finally lifted.
What happened was the Hebrews conquered pagan people, who opposed their entering the Promised Land. Some of the captive women conspired to use sex in order to seduce Hebrew men and turn them against their faith. When the conspiracy was uncovered they needed to punish the guilty parties. Those women who were virgins would be considered prime facie innocent of the offense because they had no sexual relations.
If my analysis of this event is accurate, and I am confident that it is, then the assumption that YHWH’s command was immoral is false and of course the other assumption that the Bible might be wrong is because it was written by selfish human beings.
On the other hand we cannot rule out the fact that the people what wrote the Bible were humans and that means they were limited in their understanding of the universe. Genesis 1 contains the truly magnificent knowledge that the universe has a Beginning and God created the universe, and space, and time out of nothing.
On the other hand the authors and hearers of this information were limited by their ANE world view. God gave humans the information that they needed most even though it was contained in out-dated scientific information, that needed to be set aside.
The Bible is the holy history of God’s People and history means change. The Bible is not the Word of God, Who is Jesus Christ, Who is without sin, but not necessarily without error. The conservative Church made a serious mistake when it made this assertion, which is bad theology and not supported by the Bible itself.