This is a very reasonable question.
My answer isn't complete. There are many angles that it doesn't cover, but some my high level notes.
Slaves were created two ways in the ancient world:
- Go and capture anyone you want. Turn them into a slave. Islam does not allow this.
- Take slaves from those who fight you. With the intention of penalizing anyone who brings war to you. Muslims in general were not allowed to start wars. Wars were brought to them.
Aside from that Islam has a habit of abolishing things through out time. Slavery was a common practice. Some slaves had masters they love and took good care of them. But I won't disagree with you, most masters were cruel and abused their power. But my point is that slaver even bad had benefits. Some people if you leave them on their own, they wouldn't know how to take care of themselves. In US part of the reason that the African Americans are somewhat behind in education is because of a sudden movement from slavery to being free. They became free. But being free isn't all that's necessary to succeed. The white had the land, the connections, the wealth, knowledge, etc. If it was slow, steady and permanent process then the slaves had time to slowly improve.
Year White Black
1870 11.5% 79.9%
1880 9.4% 70.0%
1890 7.7% 56.8%
1900 6.2% 44.5%
1910 5.0% 30.5%
1920 4.0% 23.0%
1930 3.0% 16.4%
1940 2.0% 11.5%
1947 1.8% 11.0%
1952 1.8% 10.2%
1959 1.6% 7.5%
1969 0.7% 3.6%
1979 0.4% 1.6%
The above are illiteracy states for Black vs White. More stats on racial gaps can be found here
Islam wanted to resolve this problem with time and delicacy. That's why it made freeing slaves a very rewarding task. There are sooo many narrations on freeing slaves. The Prophet (PBUH) and the Imams freed many slaves themselves.
Additionally as far as I can tell, Islam doesn't have any religious instructions for imprisoning someone. Islam doesn't want to hide social need of every person's life. What good is it if a person goes to a prison where there are no wife, children and he's surrounded with other criminals?! As far as I can tell prisons are not something Islam recommends. Islam says you did something bad, ok, get wipped 50 times and go back to your life. We rather not kill or imprison you. But then it's also difficult to bring a war enemy straight into your community. Slavery is like a much more extended and sever community service. The person does time but still has a life among normal people. Though if someone has done too many bad things then capital punishment is considered, but that's a totally different discussion...
To summarize and add some other notes:
- Slaves are only made from war enemy captives
- Freeing slaves all at once would be bad for society and the slaves, Islam ultimately wanted to abolish it through time. Like think if one president abolishes the previous presidents insurance policies without offering a new one. Islam was trying to gradually just abolish slavery but replace with a completely different motto. That everyone is equal:
A person is either your brother in faith, or your equal in humanity. - Imam Ali
- Islam had very generous rules for slaves:
- The punishment of a free man is twice as the punishment of a slave.
- Sit with them and eat the same food.
- Give them the same clothes you use.
- Don't ask them to do anything you're not willing to do yourself, etc.
- Islam values social life and doesn't have prisons. You don't want to be put into a prison for 20 yrs.
- Islam allowed slaves to buy themselves back for a reasonable price. So if someone fought the Muslims, had a family, then if he did enough work, he was able to go back.
- Ultimately having captives, reduced chances of future wars, deaths, chaos. It's a huge penalty for the greater good, but one that can also be remedied with time.
For all the reasons above, the person is not entitled to his freedom, due to raising war and attempt to take away freedom and life from others. While not worthy of death he's still entitled to many rights (unlike other kinds of Slaver which Islam didn't approve), including the right to pay off his owner to earn his freedom, but also that it's recommended if he's kind enough then his owner is to free him for the sake of Allah ie without money