Double effect

The good and bad effect of an action, compared according to a principle which seeks to justify the action if the bad effect, though foreseen, is outweighed by the good effect. (Source: Wikipedia)