To answer this question, consider the religious context for the idea that the sole purpose of sex is procreation. In Genesis 1:27, God tells Adam and Eve, “Be fruitful and multiply.” This Bible verse, along with others, has resulted in a fair amount of Christians believing that the main purpose of sex is to create children. This is not a belief that they’ve fashioned out of thin air; it’s one that’s attributed to God. Sex that does not led to procreation or that inhibits procreation—anal sex, oral sex, sex using birth control—is seen as contrary to God's wishes and could be said to be sinful.
Abortion itself can be said to be sinful because the Catholic Church has said that human life starts at conception. Under this view, a person who gets an abortion is terminating a human life. They are, according to some, destroying one of God’s creatures and committing a grave sin.
Now, one might want to think about how the belief that sex is primarily for procreation has propelled some to engage in the kind of activity that they claim to be against: harming and destroying a human life. Abortion clinics have been bombed, people associated with performing abortions have been killed, and LGBTQ+ persons have been harmed and killed in part because of the view that sex is for one main purpose.
One might also want to think about how other religions, like Islam and Judaism, deal with sex. Like Christianity, Islamic and Jewish texts have often been interpreted as portraying sex as mainly for procreation purposes. Yet some readings of Islamic law argue that there are instances in which birth control is valid. While the Torah prohibits specific kinds of sex, it does not prohibit married couples from deriving pleasure from sex. Of course, not all Christians maintain such a binary perspective on sex either.