Because that encourages reproduction. But some people don't have that much fun reproducing with the opposite sex. So does that mean that they are meant to not reproduce? According to the mighty Wiki, it also strengthens social bonds. Not meant to reproduce, maybe, but it still plays its role. So which came first, the orgasm or social bonding? Animals reproduced millions of years before social bonding, so probably the first.