Bruh, he asked a theological question about Christianity. I gave him an answer based on the only source available for complete Christian doctrine. If he asks about Christian theology it would make sense to refer to that source. For the verse you asked about, in scripture God did this for the purpose of Israel prospering as a nation. Having slaves was having more propert which made you richer. He did not want them taking slaves from their own brethren. As I stated before, this is what the BIBLE says and what I believe but it is not undisputed historical fact nor should it be seen in that way if you do not CHOOSE to become a Christian.
So what you're saying is your God said it was okay to have slaves. Oh, ok.