Things happen. Human beings have purposes and intention. Things don’t.
Here’s the Catholic Church on contraception, taken as before from Rejection of Pascal’s Wager. John Chrysostom found it appalling: Indeed, it is something worse than murder, and I do not know what to call it; for she does not kill what is formed but prevents its formation. Weird. Pius XI wrote, No reason, however grave, may be put forward by which anything which is intrinsically against nature may become comformable with nature and morally good. Since, therefore, the conjugal act is designed primarily by nature for the begetting of children, those who in exercising it deliberately frustrate its natural power and purposely sin against nature and commit a deed which is shameful and intrinsically vicious. So a condom to prevent spreading AIDS was forbidden by John Paul II.
The current position: Wikipedia’s source claims condoms were permitted by Benedict XVI; but Francis dodged the question, claiming other problems of Africa were more important. Indeed they are, and indeed the Pope crying out against poverty is a good thing; but one word permitting condoms where there is risk of AIDS transmission is not too much to ask. Francis referred to the “openness to life of the sexual act”.
A single celled eukaryote ancestor of all flora, fauna and fungi produced a gamete requiring another gamete to produce a new organism. How this evolved is a mystery. The result is to permit the evolution of complex, multicellular organisms, but that was not the purpose.
Orangutan females have sex with lots of males. A theory is that they are aware of fertility, mate with the best male when he will be the father, and mate with the others so that they will not kill an infant which might be their own. Humans have sex when infertile. This has the effect of bonding people together. It did not evolve with that purpose, but arose at random, and flourished because it promoted reproduction.
Sex is not designed. It has effects, and people do it to achieve those effects; and we ignore the risk of other effects because that, too, promotes reproduction: this forgetfulness flourishes. Natural law theory fails because it confuses is and ought; and because in this case it chooses the troublesome, rather than the pleasurable, effect of sex as its purpose. Thomas Aquinas said contraception is a grave sin and to be classified as a crime and against nature- I sourced that quote from Father Hardon– so the Roman Catholic Church is stuck with facilitating the spread of AIDS. I find that immoral- but I judge it by results, rather than by considering the acts causing them.