They introduced slavery because they needed workers. The plantations and the ranches were owned by the Spaniards and the Brits who had large areas of land and no workforce to work on it. The kings guaranteed that they could enslave people to work for them so they enslaved the locals, and started buying from the African slave market.