Countries are starting to give wild animals legal rights. Here’s why.