Absolutely, but externalities don't justify the original act.
Definitely not denying the benefit that innovation brought, but just because the human testing on humans in concentration camps brought medical advances doesn't justify the original crime.