Procreation is definitely one of the purposes of sex, but it is not the only one. And these days, it is not the most widespread reason. We live in an age where procreation has become a secondary purpose. If procreation was the only purpose for sex, then infertile couples would be prohibited from being sexually active. Does that sound fair to you?
While that is one of the reasons for sex, it is not the only reason. Sex should also be for pleasure. If sex was only intended for procreation then what would be the use of an orgasm? Also, if sex was only intended for procreation, then that would mean old couples should be barred from having sex. Does that sound logical? Sex is for procreation but also for pleasure and enjoyment.