So why do we need space sperm? Well, if we ever want a colony of people in space, the ability of sperm to perform in microgravity will be relevant. Similar deal if we ever hope to put a permanent settlement on Mars or the moon. And there's reason to suspect the spermies will have trouble in this environment. Previous research with animal sperm has shown that it doesn't quite behave in microgravity as it should. And even if we never want to make space babies, studying sperm in microgravity might reveal things we can't see on Earth -- information that might be useful for improving old-fashioned terrestrial fertilization, as the kids call it these days.
The tests involve nothing gross -- just microscopes, chemicals, and presumably very well-sealed containers. No word on how the samples were collected, whether NASA raided a sperm bank or ran some kind of in-house raffle or something. However it came off (heh), we can only hope that it happened at great expense to the taxpayers.