How captivity saved these animals from extinction