These are the conditions under which you could have kept slaves back in 600AD
SLAVERY
The reason why slavery is currently haram is because slavery previously existed to protect women and children that had been captured. Had these women and children not been protected by their masters, they would've been raped, attacked or even killed. Slaves were also only obtained via war. Kidnapping is and was completely haram in Islam.
Slavery was never liked in Islam and only existed for that one purpose. There are also many conditions to owning a slave such as:
1) You cannot beat or attack your slave (if you do, you must free the slave).
2) You cannot rape your slave (the punishment for rape is death).
3) You must feed your slave (if you don't, you must free the slave).
4) You must clothe your slave with the same clothing that you wear.
5) You must view your slave as your equal.
6) If a slave desires freedom you must allow them to work for an agreed upon amount of time until they become free.
7) Joking about freeing a slave automatically frees the slave.
8) The only people that can be enslaved are Prisoners Of War who have actively attacked Muslims (aggressive Jihad does not exist).
As you can see Islam basically elevated the rights of slaves to that of free men and women. Because of all of these rules and regulations on slavery, modern Ulema have come to the the Ijma that slavery in the modern world is completely haram.
SEX WITH SLAVES
Now on to the topic of one having sex with a slave.
A female slave who had an intimate/sexual relationship with her owner was called a concubine. The classic example from the Bible is Hagar and Abraham. Concubines were often used as a means of having more children. Islam allowed this because these women were living with these men and sexual relationships tend to spontaneously happen between men and women in such close contact often enough to warrant addressing. It's human nature, you put people attracted to each other together, they'll start having sex. It never seems to get old either as this is still the central part of the plot in most popular fiction and reality TV.
The Quran mentions this because once slaves where taken via war the slaves had to live with whomever owned them. It is not uncommon for attraction to happen between men and women living in close quarters and so to ease this, Allah made it halal to have concubines aka 'sex-slaves'. However, and this is a vital part, it was haram to rape the female slaves, so only if there was a mutual attraction was it legitimate. And before you say the fact they took slaves and made them concubines is morally wrong, it was the standard in many cultures - seriously just rewatch Mulan, the Hun soldiers mistake Mulan and the men dressed up as women as concubines :L
Saying all this, it is illegitimate to have slaves now as the only time you could have slaves is by taking them as prisoners of war after they have directly attacked your Muslim tribe - something that no longer applies to modern day living so it is now haram to both have slaves and to have sex with slaves.
Obviously OP likes to pick and choose what he asks us Muslim women whilst leaving out vital information.
Updated 10 Feb