Ultimately, the purpose of preserving biodiversity is to maintain ecological function so when a species exists only in captivity, it is ecologically extinct.
The ultimate goal of conserving biodiversity is to preserve ecological processes, which means that a species confined to captivity has lost its ecological significance.