Two factors contributed to the justification for owning slaves. One was precedent or history. Meaning, for most of human history people had slaves and had "owned" other people. The second reason is that slavery has been enshrined in our holy books. Both the Bible and Koran acknowledge and lay out a set of rules as it relates to owning and how to treat slaves. This is true for eastern religions as well. These texts, while allowing the owning of slaves, do not encourage or allow their mistreatment.