It rarely pays to look a gift idiom in the mouth, but the comparison between cleanliness and a whistle fairly cries out for further examination. Ostensibly, to be as clean as a whistle means to be as smooth and clean as a clear-toned whistle. If too much grime builds up on a train's whistle, for example, its tone and clarity will be seriously affected. A homemade wooden whistle must also be shaved smooth before it can produce a clear tone.
The difficulty with this explanation lies in the connection between "clean" and "whistle." There are some word origin experts who suggest the original saying is "as clear as a whistle instead. This would imply that the object in question is unambiguous and clearly defined, much like the sound of a whistle or a bell. Well-written instructions left behind by a supervisor might be said to be clear as a bell.
There is also the dual meanings of the word clean. A well-used whistle is not exactly the first thing one might associate with hygiene. An older meaning of "clean" implies a level of smoothness, as in a clean-shaven face. A rough surface would produce too much air resistance for a pure tone, so the whistle's maker must strive for a near-perfect smoothness around the mouthpiece and air hole.
To further complicate matters, there is also a variant on the phrase that makes about as much sense and is possibly closer to the mark. Some people say an exceptionally clean or smooth surface is as slick as a whistle, covering much of the same territory as the original as clean as a whistle simile. A bald man's scalp could be described as slick as a whistle, for example.
There is surprisingly little agreement among word origin experts concerning the first incidence of the simile "as clean as a whistle". It is possible that a number of earlier idioms became corrupted over time and "clear as a whistle" became "clean" throughout a perpetuated misunderstanding. Sometimes when a corrupted or mistranslated idiom makes as much sense as the original, it becomes the more accepted version over time.