The world of wildlife science and preservation has made the biopsy dart a routine tool of the trade. A high powered crossbow similar to that used to deliver the initial blow to an animal in the later years of the whale hunt is shot at the animal. The difference is that instead of a harpoon intended to cause deadly injury, a fine stainless steel needle takes a tiny bit of blubber and skin then falls into the water. The animal swims away free and the floating dart is retrieved from the water.
Painful? Possibly. There are reports of animals showing a short term highly excited reaction, biologist-speak for pain as far as I'm concerned.
How then do we justify this pain when we are supposed to be protecting and preserving these animals?
The good of the species.
By learning all we can without actually capturing each individual animal. Every animal that we get a biopsy from tells us about the individual (which can also tell us about health issues in the species) and, more importantly, how this animal fits into the population genetically.
Genetic information.
Many endangered species populations consist of a few hundred animals. Genetic bottlenecks with the accompanying potential for magnifying flaws are a huge concern, especially with the higher mammals. The Florida panther ( Felis concolor coryi) was nearly lost because inbreeding had reduced overall health and reproductive capability.
With species like the North Atlantic and North Pacific right whales, we don’t even know if there is a genetic bottleneck but it is certainly highly likely. By using a biopsy dart gun, causing a few minutes of discomfort to the animals involved, it is possible to get information about the health of a population. So we do it. And hope for the best. For the individual. For the species.