Different definition of slavery then. Most of it was voluntary to work off debts.
It was nothing like the chattel slavery that you’re thinking of.
It IS, however, a comparison that anti-God leftists use to “judge” God and His Word.
There was plenty of chattel slavery.