To add on to what OC said, being able to see species is great for education, and thus, conservation. Think of all of the popular animals you know, the ones featured in books and cartoons, the ones people say are their favorite, the ones a random person on the street might be able to say something about. Other than a few outliers that are well known because of specific reasons, like blue whales and great white sharks, every single one of those animals is well known because people have seen them in zoos. Seeing them in captivity causes interest, which leads to money and education for saving those species' wild habitats. It also helps further laws and other protections for those species.
If you go to the WWF website, an organization most have heard of, The species mentioned on the drop-down "wildlife" tab are tigers, elephants, gorillas, pandas, polar bears, rhinos, sea turtles, and whales. All but whales are either common in captivity and have been for the last 100+ years, or are well-known from captive individuals (pandas). The WWF works with a lot of species, but those are the ones people donate money to, those are the faces of conservation as a whole. Without zoos bringing those species in to public view worldwide, people would likely care much less about them.