I recently watched a documentary called The Science of Sex Appeal. It was all right, I guess, though there was a lot more sex appeal than science, and it was completely heteronormative. But, I'm going to assume what science there was wasn't wrong, just dramatized and a very small portion of the whole.
So, the smell of sweat happens when perspiration mixes with the bacteria growing on your skin. Each person's immune system, which dictates what bacteria are allowed to grow, is different. Ergo, each person's sweat smells a little different.
And if we are driven to procreate with the best possible match, that person would be one who has a very different immune system from our own, so that any offspring would be likely to have a strong immune system that can battle the most bad things.
Apparently, this is why siblings tend to smell really bad to each other--their immune systems are from the same gene pool, and it's a subconscious way for our brains to tell us, "Dear god, not that one! Not that one!!!!"
Now, why the hell am I telling you this?
My family is extensive and convoluted, to say the least, and much of it is located in and around my hometown. I have second and third cousins probably into the hundreds, and I don't know the bulk of them. I went to a funeral in my hometown this weekend for someone who was not related to me, and I ended up sitting next to a man who was well-groomed and well-dressed--clearly hygiene was not an issue here. And the way he smelled like to had my eyes watering.
Yep, probably a cousin.
(True: This is why, when I lived at home, I had a "don't date within the county" rule. Too many chances to accidentally turn up at the same family reunion.)