Slavery has been around almost as long as humans civilizations have. Of course, though, in most civilizations, slavery wasn't based off of skin color, but usually slaves were captured and conquered people or criminals.
It's been around since the beginning of human civilization. The reason is that workers are very important to any business but at the same time are very expensive. So, simple greed is the reason and justifications to excuse it.
Pretty much what Clara said, I'd add though the reason that Africans were the race of choice in Europe and the Americas, is due to the scripture that Noah cursed his grandson Canaan, and said he would serve his brothers, Christians determined that his curse was shown by his skin color. So that justified them capturing Africans and export them for slaves.