Permitted Does Not Equate to Desired
There is a difference between what God permitted to happen subsequent to sin entering the world and what God desired from the beginning and ultimately makes right in Christ.
Jesus illustrates this point:
"Because of your hardness of heart Moses permitted you to divorce your wives; but from the beginning it has not been this way" (Matthew 19:8).
There is a difference between the ideal that God made "from the beginning" and what He allowed and regulated after sin entered the picture.
From the beginning, God's desire for marriage was for there to be one man and one woman joined by Him. Sin came into the picture and corrupted this arrangement. Because of the hardness of men's hearts, God permitted and regulated divorce and polygamy. This is reversed in Christ. "Have you not read?"
I would argue that the same is true of slavery. God's intention from the beginning was not that people would own other people. Because of the curse of sin, slavery came into the picture and God regulated it (the first mention of slavery is in the context of a curse due to sin, Genesis 9:25).
The fact that God allowed and regulated these matters does not equate to God desiring them or intending for them to remain indefinitely. In fact, what we see in Christ is a reversal and renewal process. Jesus' argument in Matthew 19 gets back to the beginning for marriage (one man, one woman, no divorce), and the entire gist of the New Covenant is built around the idea that freedom (primarily from sin, but includes being owned by others) is what God ultimately wants (John 8:32; cf. I Corinthians 7:21; Philemon). To see this clearly, though, one needs to study through the contexts and the bigger picture of Scripture from the beginning to the end.
When people point to matters like slavery or polygamy as proof that the Bible teaches error, they are missing the point of why these things existed and what God's intentions were through Christ. Sin brought many consequences and God permitted certain situations to exist due to corruption, but His plan all along was to bring back His desire "from the beginning" through Christ.
To see what God wanted all along, go back to the beginning. When sin came along, see how the curse of sin changed everything. Then see how God brings reversal and renewal through Christ. What God desires is what is found "from the beginning" and made anew in Christ. What God permitted and regulated for the hardness of hearts, while now commanding all to repent (Acts 17:30-31), is not a fair representation of what God desires and sets straight through Jesus Christ.