"And when the Lord thy God hath delivered it into thine hands, thou shalt smite every male thereof with the edge of the sword: But the women, and the little ones, and the cattle, and all that is in the city, even all the spoil thereof, shalt thou take unto thyself; and thou shalt eat the spoil of thine enemies, which the Lord thy God hath given thee." - Deuteronomy 20:13-14
Read it again.Funny, neither of the passages you cited have a direct command from God to make slaves out of other people. I do believe your inference is incorrect.
There is a command to take human beings into captivity against their wills as spoils, meaning to take and treat them as property like cattle.