Why does sex feel good?
I suppose it's because our bodies are designed to respond with pleasure when our sexual organs are stimulated.
But why is this so? If you believe in intelligent design, then I guess your creator has a few questions to answer (and I'm afraid it looks like he's not talking). I, however, am of the opinion that evolution is the most reasonable hypothesis currently on the market.
So what is the key to evolution? Survival. This sounds like a tautology, but that which is adapted to survive will survive, and that which is not will die off.
What forms does survival take? One is immortality - indefinite survival of the self. Unfortunately, this poses certain physical problems (see the Law of Entropy), and I don't believe any living organism we know of has figured it out...yet.
Another form is renewal. Though the individual must eventually die, his species can live on through his progeny. Enter the cycle of life. Those that wither and die are replaced by new generations, created through sexual reproduction.
As we can see, procreation is important for survival. So what kind of mechanism is necessary for organisms to procreate enthusiastically, in order to encourage the continued propagation of the species?
Logical thought is one possibility. An organism may procreate because he understands the need to procreate. However, many organisms have not developed an intellectual faculty for logical thought (as far as we can discern). Furthermore, an individual may decide that survival is not his goal.
The species with the best chance for survival is the one that has an overwhelming compulsion to reproduce. An organism that enjoys sex is more likely to fuck - and fuck often. Since we are the product of many years of evolution, it may very well be the case that sex feels good because it has enabled us to survive.
Now, an amoeba or a fruit fly's primary concern may be to reproduce before it dies, but we as humans are highly advanced organisms. Beyond survival (of the self, and the species), there is a little thing called "quality of life", that we can afford to concern ourselves with. And though happiness is very complex, in general, pleasurable activities are desirable - including sex.
Of course, procreation - while both important and rewarding - carries a large burden, and is not the desirable end result of every individual sex act, for organisms intelligent enough to understand the process and make that decision. Reproduction is fundamentally important for the species, but pleasure is an even more basic desire for the individual. And while an individual may desire to reproduce only a handful of times throughout his life, he wants to experience pleasure as much as possible.
Sex fulfills a very unique and strong desire. It is unlike any other. A man can pursue all sorts of alternative pleasures in life, but none will equal the pleasure that sex brings. Perhaps in some transhumanist future, we will be able to displace the need for sex and replace it with something decidedly less risky, that also doesn't involve the complications of interpersonal relations. Perhaps we will become the engineers of our own evolution, and be able to separate completely the pleasure of sex from the need to procreate.
But for now, we have to deal with the potential complications of sex (transfer of disease, unplanned pregnancy, complicated relationships), while understanding that sex is both pleasurable, and fulfills a fundamental human need. I think we are intelligent and sophisticated enough to engage in recreational sex responsibly. Shaming people out of having sex too freely is no longer helpful (if it ever was). It negatively affects the quality of too many people's lives, with minimal benefit (it does not encourage people to fuck responsibly). People should be allowed to decide for themselves whether or not to engage in sexual activity, after being properly educated about both the pros and cons, how to minimize risk and act responsibly, as well as how best to enjoy oneself (and one's partner(s)).
And aside from that, whether in addition or as an alternative, people should be encouraged to pursue the erotic arts and seek out the sensual pleasures in life, and develop a rich fantasy life, for those times when sex with another is not convenient. Life is a sensual experience, and there is no excuse for shaming people out of being able to enjoy those pleasures.