Are you condoning slavery? It sounds like it.Taking a slave in Mohammed time, was also protecting him.
The key word there is slave. When you make a person a slave, you steal his labor, his freedom, his autonomy, and his dignity. If he needs protecting and you want to do him a favor, give him sanctuary and a job, don't take him as a slave.
Those are humanist values, and they derive from rational ethics, which is the thoughtful application of the Golden Rule using humanist values, values that differ radically from those of the Abrahamic religions in many places.