Some words on slavery that is legislated by Allāh and attempting to "justify" such a ruling to secular humanists:
بسم الله الرحمن الرحيم
Clarification:
Before delving into the subject, we must clarify the affair regarding ''slavery''. In our times, many have misrepresented the normative positions of the tradition as a means to deflect criticism of the religion and bat away the doubts. These people have come in our times and have either said ''slavery isn't part of the religion'' or that ''the rulings pertaining to slavery are not valid anymore''' or that ''Islam came to gradually abolish slavery''. Such claims have no basis whatsoever.
Islam restricted how one could be enslaved and definitely encouraged the freeing of slaves and neither was the enslavement on account of skin colour, but this is very different from saying Islam came to slowly remove the institution of slavery and neither is there any proof for this. In Islam, the enslavement of war-captives and the women and children of the enemy combatants is linked with offensive jihad/futuhat. As long as there is the opening of new lands (and jihād is established till the hour), there will be always more slaves.
We know the early Muslims conquests brought in many slaves under the Muslims. In addition, the classical jurisprudence related to the Muslim polity and overall ethos of the Muslim foreign policy is that ideally, the Muslims should be expanding whenever they (i.e. when they have military power & strength and where there are no treaties/truces) can so this means there will always be an influx of new slaves. In our classical jurisprudence, there are whole chapters on the fiqh related to slavery written by the jurists (who understood this to be from the Book and Sunna) so it was never the case that slavery as legislated by Islam was progressively and gradually being abolished. No pre modern/pre colonial traditionalist position ever espoused that Islam came to gradually remove slavery - this is a very modern post colonial position.
So it is definitely part of the religion and thus one can't simply deny it to just to bat away the attacks on the religion.
On our difference with secular humanism:
Islamic slavery/concubinage can never be "justified" using the concepts/language/frame of reference of secular humanism. No answer that we may give shall truly satisfy them because our base frameworks are so totally different and diametrically opposed to each other that they are completely irreconcilable. Our moral compass is rooted in divine revelation (i.e. Allāh legislates and He is the One who gives rights) as opposed to man giving man rights (complete subjective conjecture).
First of all we have to point out that the secular humanist is not even able to substantiate his moral claims due to his subjective worldview so his external moral criticisms mean nothing to us anyway.
The secular humanist, IN PRINCIPLE, believes it is "immoral" to own another whilst we believe it is totally moral to own another being via enslavement. Irrespective of the laws regarding the good treatment of slaves, the secular humanist will always find it barbaric. So, even if the Messenger ﷺ owned slaves for one hour and then later freed them, the secular humanist will still have an issue with this because of the very fact the Messenger ﷺ owned slaves and had no issue with slaves being owned.
The issue is, these modern concepts like "freedom", "liberty" & even "consent" or "human rights" (as defined by the UN) are alien concepts to the Islamic paradigm.
As the universal declaration of human rights state:
Article 1:
"All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood."
Article 4:
"No one shall be held in slavery or servitude; slavery and the slave trade shall be prohibited in all their forms."
We don't even believe in such concepts and ideas the secular humanist simply assumes to be true. rather we vehemently disagree with them due to our own theology, laws, values and ethic that is found in the tradition:
1) We don't believe humans have inherent rights simply on the basis of them being humans
2) Allāh is the one who gives rights to His creation for all rights and authority return to Him
3) Such rights are given on account of the belief of a human being. The Muslim has more rights than a disbeliever according to us
4) Not everyone is "equal" and according to us there is a hierarchy based upon belief. The Muslim solely due to his imān (faith) is superior to the disbeliever who is upon disbelief
5) Disbelievers can be enslaved after jihād al-talab which is launched on account of their disbelief and then can be brought and sold as mentioned in classical jurisprudence
So, as we can see such concepts and such declaration of human rights as stated by the UN truly are in contradiction with the general Islamic ethos, theology and law.
Perhaps we could say that no one in the pre modern world acknowledged such ideas and that it was simply a given that humans could enslave others and masters had the right to their slave girls. So all throughout history until only about 200 years ago this was normal and no one saw it as immoral but it's simply due to the shift in moral tastes and how society as a whole began to change, that people began to find this immoral. But their response to this would simply be, just because everyone was doing X, that doesn't make X neccesarily right.
Also, if we were to use such a justification for the command of Allāh or the actions of the Messenger ﷺ, "ooh...It was normal for everyone", it simply makes Islam and the Messenger ﷺ a product of their time and this is seriously troubling for the Muslim who believes in Revelation for all times and places that is supposed to be something that dictates society rather than the other way around. (This isn't to say, Islam was oblivious to the realities of its time, as we know it wasn't, since it's a practical religion. Islam simply cut off the avenue of how humans could be enslaved and restricting it to war-captives such as the women and children of the disbelievers).
The fact of the matter is that all nations had laws pertaining to certain issues like slavery, so it is technically the case that everyone else agreed to an extent and practiced their own type of slavery, but it's simply the case, that Islam remains with these laws whilst other people didn't.
For us, owning another human being through enslavement after a conquest or buying them from slave markets (of legitimately enslaved individuals i.e. through futuhāt) as Muslims did for hundreds of years is moral and justified, simply because Allāh made it halāl.
The faithful Muslim shouldn't even attempt to "justify" the rulings of Allāh to those who don't even believe in the Lordship of Allāh in the first place. We simply articulate to the best of our ability with wisdom and sound knowledge and move forward.
This was completed just before Maghrib on the 11th of Dhu al-Qa'dah, 1441 years after the blessed migration of the beloved Messenger ﷺ. I ask the Muslims to pray for this poor slave who is in need of the mercy of Allāh and to grant us death as Muslims for there is no greater victory than dying as a slave acceptable to the Creator.