Animals are often kept in captivity. They are used for entertaining people. For example, snake-charmers use snake and madaris use monkeys to entertain people. Since they earn livelihood from these animals, they mostly take good care of these animals.
But no animal would like to live as a slave. Everyone likes to enjoy freedom. So, it is important to follow the law by the government and let the animals enjoy in their own habitat.