It's something you learn if you read about criminal investigations. One case that comes to the top of my mind is the Central Park Jogger. They got a DNA sample from her boyfriend that matched some DNA on her clothing. They didn't suspect him of being involved in the crime. They wanted to eliminate those samples as relevant to their investigation.
I'd add something more here: certain other posters seem still to be wedded to the view that police requests for voluntary DNA (or other bodily) samples are ONLY (or - being generous to them - mainly) used in a DIRECT search for suspects. In other words, if the police recovered (for example) semen DNA from the body of a murder victim, they could use the voluntarily-obtained samples to cross-check to see whether any of their volunteers was the culprit.
And this is indeed SOMETIMES the reason for a voluntary request for DNA etc. For example, this was exactly the reasoning behind the mass voluntary DNA request in the World's very first DNA case - The Colin Pitchfork conviction in 1988.
BUT..........often (and in fact probably more often than not), voluntary provision of DNA, prints and/or hair is for a very different purpose. It's NOT in order to either "eliminate from the inquiry" or "put in the frame" the sample volunteers. Instead, it's to enable the police to quickly check whether evidence that they collect at the crime scene is worthy of further investigation.
I have explicitly given an example of this before, but I'll do so again:
Suppose that the police in the Meredith Kercher case were just starting to forensically examine the murder apartment on the 2nd November 2007.
Suppose they suspected that they might reasonably find fingerprints on door handles and light switches (for example).
Suppose they suspected that these fingerprints might reasonably not be in blood, but might instead be normal latent fingerprints.
Suppose the police now voluntarily requested a primary database of fingerprints (in this instance) of all those people who might INNOCENTLY have touched that light switch over the past few weeks - i.e. all the girls who lived there, their boyfriends (if they'd visited the girls' apartment), the boys from the flat below, any friends who were known to visit.
If the police subsequently DID find any latent prints on any light switches (or, for that matter, ANY DNA, hairs or prints), then they could quickly and easily cross-check those prints against their database of voluntary samples (plus of course samples from the victim herself).
In this way, the police would be able, quickly and efficiently, to determine which forensic evidence was worthy of immediate further investigation. For example, if a fingerprint on a hallway light switch could immediately be identified - via the voluntary samples - as coming from Laura (who, incidentally, I'm imagining might not have her prints on any existing police databases, which could enable comparison via another route), then the police could virtually discount this print as potential evidence.
Why could they discount it? Because Laura had every reason and opportunity to have left this print entirely innocently (EVEN IF she HAD subsequently been suspected of involvement in the murder). So the print would have most likely had NO evidential value in court - regardless of whether Laura herself ended up on trial based on other evidence.
On the other hand, if a fingerprint on a hall light switch did NOT match anyone on the police's volunteer database, then clearly it would be worthy of immediate further investigation. The person who deposited might still have an innocent explanation for doing so (purely for example: perhaps the police might subsequently find that the print belonged to a washing machine repair man who'd visited the flat a week previously and had turned on the light in order to repair the machine). But the unidentified print was more likely in this instance to belong to someone who had no innocent reason to place him/herself in the girls' apartment.
So there IS another very important reason why the police could have (and should have) obtained bodily samples from the housemates/boyfriends/etc - and it's nothing to do with evaluating their own (i.e. the housemates/bf's/etc) levels of guilt or innocence.