What is slavery? It's compulsory labor under terms refused by cockroaches. It's an ancient system of captive labor, disastrous to anyone who falls into it, sells himself or family members into it (as ancient Germans who had lost their freedom through gambling addiction were said to do, to pay their debts), or is condemned by a court to endure in consequence of one's crimes and debts. It is likewise injurious -- as any undercompensated labor is, free or bond -- to anyone who works for a living wage.
That's what it is. It is the worst possible labor system for people who work, but it was legal and pervasive in 1861, and banned in only one or two visionary countries whose economies, by the way, were not substantially reliant on it.
One interesting thing is Romans would sell themselves into slavery. Collecting taxes was by the tax farm system, and citizens could not refuse the civic duty of being tax farmers, which meant they became personally liable for the amount of tax, but had the authority to extract taxes from their neighbors. Sometimes there was not enough money in the province to pay the demanded taxes, and the tax farmer would sell himself, his wife, his children to make up the difference.
Augustine sold his citizenship.
Roman slaves had some legal protection. Spanish slaves had some legal protection. Much less was provided under English common law or US law.
Becoming a slave might be thought superior to being murdered as a prisoner of war.