Question: what is the purpose of the doctrine of double effect?
Answer: The doctrine of double effect. This doctrine says that if doing something morally good has a morally bad side-effect it's ethically OK to do it providing the bad side-effect wasn't intended. This is true even if you foresaw that the bad effect would probably happen.