There is an important moral distinction between a harmful effect occurring as a side effect of pursuing a good end and causing the harm as means to the good end. Sometimes it is expressed as the view that it is permissible to cause a harmful effect we do not intend, but is an inevitable result of doing something good (if the good thing sufficiently outweighs the bad), but it is wrong to intend the harmful effect, even if we intend it only in order to achieve the good result. So it is all right for a doctor to inject a large dose of morphine into a patient to relieve their paint, knowing that it will make them die sooner, but it is wrong to give that injection with the intention of killing
There is an important moral distinction between a harmful effect occurring as a side effect of pursuing a good end and causing the harm as means to the good end. Sometimes it is expressed as the view that it is permissible to cause a harmful effect we do not intend, but is an inevitable result of doing something good (if the good thing sufficiently outweighs the bad), but it is wrong to intend the harmful effect, even if we intend it only in order to achieve the good result. So it is all right for a doctor to inject a large dose of morphine into a patient to relieve their paint, knowing that it will make them die sooner, but it is wrong to give that injection with the intention of killing