Well, yes. But humans are about the only creatures that have sex when the female is not fertile. Thus, however that came about, sex must fulfill some other role in humans. One role is to help keep parents together, so as to better provide for and raise the offspring, which are more helpless and take longer to mature than those of most other species. Although many birds mate for life without the extra sex, so there may be still more to it for humans.
Then why does my dog hump my leg?.
I'm just saying....
Both Darwin and the Church teach that the PRIMARY purpose of sex is procreation.
From the early middle ages until after the Reformation, Christians both Protestant and Catholic taught that sexual relations are only legitimate in marriage, and that marriage has three purposes:
1. Procreation.
2. Companionship, love, and mutual help.
3. Assuagement of lust (from St. Paul's famous saying, "It is better to marry than to burn").