Another former zoo employee here. Please take into consideration that not only do accredited zoos have to meet very stringent guidelines for their animals, but also that the vast, vast majority of animals have either been bred in captivity (and as the previous commenter noted, they are often exceptionally important to growing the species) and thus never could be released or they are animals who were rescued from the wild because they could not have survived there. Many zoos, including my own, commit that none of their animals will be acquired by any method other than the two listed above.
Both of our sea lions were “taken” from the wild. One was born blind and was abandoned by its mother. The other was critically injured after a run-in with a boat propeller. Both would have died except for the fact that they had a place to go.
Are zoos perfect? No. But the “zoos” that have flagrant problems are usually the sideshows and sanctuaries that simply want to capitalize on ignorant people who just want to see some cute animals and put no other thought into why those animals are there.
Please do not lump accredited zoos that do so much for research, conservation, and educating the public with those places.
Always do your research, but when you are convinced, please support your local zoos and animal sanctuaries that care about the wellbeing of their animals. They are the last line of defense for many animals and species that would be in great trouble otherwise.