It doesn't say "free all slaves", it says that freeing a slave is a good deed that can assuage sin or gain entry points for paradise.
You need to bear in mind the context where in the early days of his preaching, many of the early followers were slaves. They were bought and freed if they converted to Islam. However, Muhammad and his companions still kept and traded their own slaves.
If we excoriate religions, politicians and philosophers of the past by the standards of today, we wind up ignoring positive if incomplete steps. But if you want to denounce all who practiced slavery and all scriptures with slavery in them, that's fair but to me is a mistake.
To me the Quran is, in part, a document of it's time and place and, as such, was a step forward compared to what was there before. So compared to the US south many hundreds of years later, the Quran established the step forward that freeing slaves was a virtuous act well before other countries and cultures started considering slavery as immoral in and of itself.
Last edited: