The difference
    between slaves and prostitutes
Question

                I've heard that it is allowed for men to
      have intercourse with their slaves. Does that stand for women too, & if men can have
      intercourse with their slaves (the ones they have bought) then why is it so much ill
      thought of the prostitutes...they too are, kind of bought at others will, for shorter time
      period perhaps. Can you make all this clear & why is it so that Islam did not stop
      slavery....they are humans as well, & are against their will kept in captivity &
      against their will may be forced into intercourse?
Praise be to Allah.Slavery in Islam was originally prescribed because of
    Kufr. If there is jihaad between the Muslims and the kuffaar, and a number of kuffaar are
    taken prisoner, the commander is given the choice of sharing them out, doing them a favour
    (by releasing them) or paying their ransom. If they are shared out as part of the booty,
    they become slaves, subject to the laws governing products which may be sold. But at the
    same time, Islam urges the freeing of slaves and makes doing so an act of expiation for
    numerous sins. In principle, slavery is not something that is desirable; what is
    encouraged in Islam is the freeing of slaves. If a woman is enslaved according to
    shareeah, it is permissible for her master to have intercourse with her. This is
    unlike prostitution or zinaa, which Islam has forbidden as a precaution against mixing
    lineages and other reasons for which it is forbidden. There is no comparison between the
    two, because if a slave woman becomes pregnant, the child belongs to the master and she
    becomes free when he dies, because she has become the mother of the masters child (umm
    walad), and is subject to the same rulings as a wife. And Allaah knows best.