It is incorrect to perceive that there was a single concept of slavery in ancient world. The Latin word for slave, "servus" at the same time meant a servant.
The concept of slavery differed very much between ancient societies and also differed in time. Sometimes a slave would be considered a member of the family to the extent that a formal kinly relationship such as formal adoption would be required for having a slave while in other societies the concept of slavery rose from the captured enemies or even possibly, rebels. Still in others one could become a slave for failing to pay a debt and could earn freedom back upon paying the sum or serving a certain term.
The societies differed much in the social status of "slaves" and their rights and the very word for slave could only barely be translated from one language to another without loosing a part of the meaning.
We currently apply the same term "slave" to penal farm convicts, prisoners of war, debtors forced to work to repay debts, dependent peasants, minor clan members and so on, who all had different legal status.
The situation is quite similar to how we apply the term "king" to various ancient titles that had little in common (rex, basilios, vanax, archon, archagestes, despotes, hegemon, tyrannos etc). There was little in common between elected and not heriditary Roman rex responsive to the senate and a Egyptian pharaon yet we call the both "kings". If a Roman of the time appeared in modern day he would possibly call the president "rex" and the penal farm prisoners "public slaves".