AFAIR
It's somewhat unclear where the phrase "clean as a whistle" came from. The phrase actually has two meanings: "clean or pure" and "absolutely, completely." "Utterly or completely" is the original 18th century meaning -- a roof blown off in a tornado might be said to have been torn off "clean as a whistle," leaving no remnants. The "pure or unsullied" meaning ("Wash that deck until it's clean as a whistle, sailor") came later, and may have its roots in a misunderstanding of the sense of "clean" in the original phrase.
If it seems a little mysterious, the answer may lie in the fact that the original phrase wasn't really "clean as a whistle." Christine Ammer, in her book "Have A Nice Day -- No Problem, A Dictionary of Cliches," points to the phrase "clear as a whistle," very common in the 18th century. While spoken commands might be misunderstood in a noisy environment, no one could mistake a loud whistle for anything else, so "clear as a whistle" came to mean "unmistakable" or "unambiguous."
The later substitution of "clean" meaning "completely" for "clear" therefore makes a certain amount of sense, but the subsequent drift of "clean" in the phrase to mean "pure" is what has led to folks like you wondering "what's so clean about whistles?"