Where do you think it came from?
Double Effect
Thomas Aquinas
The principle of double effect; also known as the rule of double effect; the doctrine of double effect, abbreviated to DDE; double-effect reasoning; or simply double effect, is a set of ethical criteria for evaluating the permissibility of acting when one’s otherwise legitimate act (for example, relieving a terminally ill patient’s pain) will also cause an effect one would normally be obliged to avoid (for example, the patient’s death.) Double-effect originates in Thomas Aquinas’s treatment of homicidal self-defense (Summa Theologiae, IIa-IIae Q. 64, art. 7).
This set of criteria states that an action having foreseen harmful effects practically inseparable from the good effect is justifiable if upon satisfaction of the following:
the nature of the act is itself good, or at least morally neutral;
the agent intends the good effect and not the bad either as a means to the good or as an end itself;
the good effect outweighs the bad effect in circumstances sufficiently grave to justify causing the bad effect and the agent exercises due diligence to minimize the harm.
(Double-Effect Reasoning: Doing Good and Avoiding Evil, p.36, Oxford: Clarendon Press, T. A. Cavanaugh)
en.wikipedia.org/wiki/Principle_of_double_effect
It isn’t about civil laws - It governs Moral Ethics