Yes, the good zoos have an essential role in preserving and saving rare and endangered species, informing visitors and students about wildlife and domestic animals, they do not only present their properties, beauty, importance, behaviour, qualities, habits, needs, etc., they provide additional knowledge and teach respect for life and nature.
The same applies to botanical gardens.