It is one of those uncomfortable paradoxes that Western Imperialism that oppressed millions of people around the world, also happened to abolish slavery, often by force and against fierce opposition among subject nations.
Along with a multitude of harmful cultural, ideological and legal impositions also came the prohibition of the enslavement and ownership of human beings; something that was, for many Africans and Asians, a novel and noxious development which they stubbornly resisted for decades.
Much like today, when the West decides something is morally wrong or ideologically abhorrent in their own societies, they demand compliance with their judgment everywhere else. That was the case with the abolition of slavery outside the Western world; in the absence of Western insistence these nations saw no need to end the age-old practice of slavery in their lands.