Slavery was legal in most society's 2 millennia ago but most society's were not built to be depended on slavery the way it was in Sparta, Rome and the American South.
And a lot the later 19th-20th century "englightened" countries that didn't have explicit slavery in their midst, have enslaved and exploited whole countries as colonies.