Thing with sex is that it's a very strong influence.. It grabs your mind and drags you off to all kinds of non-clarity mind frames, kind of like a drug addict jonesing for a fix. So you lose yourself.. Whether or not it has particular health benefits is beside the point, as it's the affect on your mind that causes you to start leaking mind all over the place, which the deeply spiritual practitioners of most faiths avoid by simply avoiding sex
Other "commandments" or "precepts" are for similar reasons
If you want to see how deep your addictions for sensual pleasures go, give up all sexual activities for a time (cut out the porn, masturbation and normal coupling you might do with a partner).
Most of us are perpetually intoxicated by desires, but don't realize it. We'll make excuses for it as well.
"It is okay to enjoy your food."
"Sex is only natural."
"Drinking helps me relax."
At a very deep level desire prompts rebirth. All your horrific experiences in saṃsāra are made possible by desire. Your probable future degeneration into the lower realms wouldn't occur if you remedied desire in this life. So long as kāma (desire) is active, rebirth in the desire realm, which includes the lower realms, is possible.
Hence the Buddha taught that liberation is made possible by abandoning desire. That means giving up sex. Arhats don't experience lust. If you want liberation, all mental poisons are to be remedied.
At a more basic level, though, no matter how much sex you have you'll always want more. I've had my share of wild experiences and ultimately it was unsatisfying and craving only increased. Some might argue that the emotional component is what we should look for, but that's another form of grasping and desire.
Emotion and lust are suffering and to follow them is to perpetuate a vicious cycle.