Why does the Bible allow/sanction slavery?

God sanctioned slavery as an economic system, not to justify cruel treatment; if practiced godly, it could work.

Watch the Teaching: How Should a Christian Act in the Workplace?