This is just as good as a WAG, since I have no cite, but I did see this in a few places.
This question, when looked at a certain way, could resemble the question “Why do men have nipples?” They are both biological phenomena that are not generally regarded as important to species survival.
But I think that if you go looking for a natural selection-related explanation for everything (i.e., asking what conditions would favor certain features), you have to be open-minded as to what feature you’re talking about. At least in this case.
So first ask why orgasm in general is favorable? Obviously the integral process to animal reproduction would be important. We don’t even have to look at it from a Darwinian standpoint: there must EXIST some process that is sexual reproduction. Orgasm (at least in males) is that process. So that’s why it is there. (Why it’s pleasurable is another question.)
So there must be some blueprint for orgasm in the human genome. We know that men have nipples because there is a blueprint for nipples in there as well, and the development of a male fetus is not a process wholly different from the development of a female one. It’s not important, would be wasteful, and not really belonging to cellular development, to say (and personifying fetus development is obviously not very scientfic) “Okay, this fetus is male, so I will now omit the nipple blueprint.”
It’s the same for orgasm. The male and female sexual systems have a significant amount of overlap. The process of ejaculation and orgasm is so central to the male sexual system, that to omit it entirely from the female would be unnecessarily wasteful. The less decisions that have to be made, the better.
So females get a lot of the same sexual wiring as males, including orgasm. It’s not there specifically because it was favored, but just because it was there to begin with, and there was no need to eliminate it.
Now this part truly is my WAG, but do animals routinely achieve the female orgasm? I suspect not, and it is more humans that can reflect on their sexual behavior, and unlock the secret female sexual reward. It’s kind of like a software easter egg. The program works fine without it, but it’s just nice to find one!