Obviously, to reproduce when there is no better alternative.
Thankfully, we are very, very, very long ways from that right now...
I doubt that rape was ever needed for the population to reproduce. Why do you think it was needed?
But nature developed that behavior for a reason...
Reason, yes, but not purpose. It may simply be a side-effect that didn't suffer enough evolutionary pressure to be extinguished. See male nipples, for example.
Pressure? What makes you think the pressure is against it?
Evolution operates on genes, not groups; not even individuals, really. Genes that somehow code for rape[1][2] will spread if and only if its carriers reproduce. The "use" of rape, then, should be fairly obvious: If successful, it lets its carrier reproduce.
Any such adaption is bound to be situational, as a healthy relationship is far more likely to produce surviving offspring, then and now. It'll be an "If you cannot get a girlfriend, then get urges towards rape" kind of thing, though typically enough there'll be a lot of variation in that.
There will not, however, be even the slightest degree of adaption in terms of what is best for the group. Group selection doesn't exist, outside of extreme laboratory conditions.
1: Or anything else.
2: Please don't read that as suggesting there might be a single "rape gene". Anything to do with the brain is really, really complex.
Remind me of Orson Scott Card's story (Ender in Exile), in which human crews building off-world colonies consisted of many more women than men (and temporarily allowed for polygamous relationships) to bootstrap the population faster.