the law of taking captive of wars as belongings of a master have existed in covenants prior to Islam.
modern practise for many slaves/captive of wars, they are kept in slavery camps.
while the practise in the past as described in Quran+Hadith was that slaves/captive of wars would be part of household members.
They need to be given clothes, food as well. Thus such lawful sexual relation is tied by status of a master and his female slave.