According to the law of the “merciful” Allah, whenever a village or tribe was conquered through Jihad (holy war), the incoming Muslims had the right to take women and children as slaves. They were even allowed to carry out sexual violence on women and young girls as well.
This is the title of Sahih Muslim book 8 chapter 29
It is permissible to have sexual intercourse with a captive woman after she is purified (of menses or delivery) in case she has a husband, her marriage is abrogated after she becomes captive.
Right after this, we have the Hadith clearing up when this command was revealed and why:
Sahih Muslim Book 8, Number 3432:
Abu Sa’id al-Khudri (Allah her pleased with him) reported that at the Battle of Hanain Allah’s Messenger (may peace be upon him) sent an army to Autas and encountered the enemy and fought with them. Having overcome them and taken them captives, the Companions of Allah’s Messenger (may peace be upon him) seemed to refrain from having intercourse with captive women because of their husbands being polytheists. Then Allah, Most High, sent down regarding that: “And women already married, except those whom your right hands possess” (Quran 4:24) (i. e. they were lawful for them when their ‘Idda period came to an end).
Sahih Muslim Book 8, Number 3433:
Abu Sa’id al-Khudri (Allah be pleased with him) reported that Allah’s Apostle (Peace be upon him) sent a small army. The rest of the hadith is the same except this that he said: Except what your right hands possessout of them are lawful for you;
and he did not mention” when their ‘idda period comes to an end”. This hadith has been reported on the authority of AbuSa’id (al-Khudri) (Allah be pleased with him) through another chain of transmitters and the words are: They took captives (women) on the day of Autas who had their husbands. They were afraid (to have sexual intercourse with them) when this verse was revealed: “And women already married except those whom you right hands posses” (Quran 4:24)
As we can see, Mohammed uses a revelation for his own convenience, as on many other occasions. In this situation, he gives his soldiers an incentive-like reward, i.e. let their sexual desires break free by rape, so that they were encouraged to wage more wars for him.
Sahih Muslim Book 8, Number 3373:
Abu Sa’id al-Khudri reported:
We took some women captives, and we wanted to do ‘azl (coitus interruptus, or withdrawal) with them. We then asked Allah’s messenger (may peace be upon him) about it, and he said to us: verily you do it, verily you do it, verily you do it, but the soul which has to be born until the Day of judgement must be born.
Sunan Abu-Dawud Book 5, Number 2150:
Abu Sa’id Al Khudri said:
“The Apostle of Allaah (peace be upon him) sent a military expedition to Awtas on the occasion of the battle of Hunain. They met their enemy and fought with them. They defeated them and took them captives. Some of the Companions of Apostle of Allaah (peace be upon him) were reluctant to have relations with the female captives because of their pagan husbands. So, Allaah the exalted sent down the Qur’anic verse “And all married women (are forbidden) unto you save those (captives) whom your right hand possess.” (Quran 4:24)
As well as:
Muwatta Book 29, Number 29.32.95:
Yahya related to me from Malik from Rabia ibn Abi Abd ar-Rahman from Muhammad ibn Yahya ibn Habban that Ibn Muhayriz said, “I went into the mosque and saw Abu Said al-Khudri and so I sat by him and asked him about coitus interruptus. Abu Said al-Khudri said, ‘We went out with the Messenger of Allah, may Allah bless him and grant him peace, on the expedition to the Banu al-Mustaliq. We took some Arabs prisoner, and we desired the women as celibacy was hard for us. We wanted the ransom, so we wanted to practise coitus interruptus. We said, ‘Shall we practise coitus interruptus while the Messenger of Allah, may Allah bless him and grant him peace, is among us before we ask him?‘ We asked him about that and he said, ‘You don’t have to not do it. There is no self which is to come into existence up to the Day of Rising but that it will come into existence.'”
As we have just seen in the Hadith, the Quran itself refers to married women being available to their masters, even though they were married:
And [also prohibited to you are all] married women except those (slaves) your right hands possess.
If Muslims wanted, they had the option of clearing the women of slavery and marrying them.