I think you need to read up on slavery in Islam.Islam dealt with the slavery issue, it was a very big issue 1400 years ago, slavery was a normal thing that time, so Islam solved that problem Gradually, A lot of companions of Mohammed after conversion to Islam started to buy slaves in order to set them free Like Bilal Bin Rabah who was horribly tortured by his owner because he converted, so Abu Bakr Mohammeds companion bought him and set him free, he was the first slave in Mekkah who had his freedom, so Islam started to put specific rules for slavery which eventually will stop slavery within a very short period of time, you have to remember that Islam ended slavery centuries before western countries, it is obvious in Mohammed teachings that each problem should be solved gradually, even alcoholism was solved slowly , until the verse of prohibition of alcohol was revealed.
you will find a lot of mistakes that can be done by Muslims in the daily life like not being able to fast in Ramadan, the penalty would be to set free a slave if you had one, or like a false swearing to god the penalty also would be to free your slave along with numerous mistakes , not to mention that there is an oath might be between the slave and his owner, like working for a specific period of Time for a specific amount of money, Islam doesnt want to set slaves for free and leave them in poverty, there were accurate solutions and steps to set slaves free.
we have to Admit that Islam succeeded to end slavery centuries before western countries.
The Quran and Mohammed's hadith encourage muslims for freeing slaves and promise them with big rewards in the after life
It was in the early 20th century (post World War I) that slavery gradually became outlawed and suppressed in Muslim lands, largely due to pressure exerted by Western nations such as Britain and France.
In 1925 slaves were still being bought and sold at Mecca in the ordinary way of trade. The slave market there consisted of the offspring of local slaves as well as those imported from the Yemen, Africa, and Asia Minor.
By the Treaty of Jeddah, May 1927 (art.7), concluded between the British Government and Ibn Sa'ud (King of Nejd and the Hijaz) it was finally agreed to suppress the slave trade in Saudi Arabia. Then by a decree issued in 1936 the importation of slaves into Saudi Arabia was prohibited unless it could be proved that they were slaves at that date.
In 1953, sheikhs from Qatar attending the coronation of Queen Elizabeth II of the United Kingdom included slaves in their retinues, and they did so again on another visit five years later.