I think you're mixing several concepts here.
When it is said that humans have sex for pleasure, what you're basically implying is that they can cheat sex. That is, they can take pleasure that is engineered to favor reproductive activity without there being any.
All organisms that reproduce sexually and are to be successful as a species, require an impulse for sexual activity. It is not hard to see that if a gene that made sex more "pleasurable" developed and it meant that organism would have more offspring, its carrier would tend to outnumber those organisms where that gene did not exist. Of course, if it became too pleasurable and there was no limit to it, the organism may forget to feed itself and die, so some sort of genetic counterweight probably developed along with it.
The use of the concept of pleasure is, of course, open to debate. It may not exist in all animals in the same sense that it does for humans, but some form of positive feedback (a chemical high perhaps) for sexual activity must exist.