The capture of a wild animal is justified only as a last resort to save that animal' s life  But many wild animals are captured not because their lives are in any danger but so that they can be bred in captivity
Hence, many animals that have been captured should not have been captured
Society has no right to punish children for deeds that would be crimes if the children were adults. But society does have the right to protect itself from children who are known threats. Hence, confinement of such children does not constitute punishment.