In many parts of the world, there are animals that are illegal to keep as pets for a variety of reasons.
For example, in California, it is legal to own a zebra as a pet (with a permit), but not a hedgehog. That is because hedgehogs could become pests and threaten the wildlife.