This is why I don't hold hadith in any particular esteem. I will take wisdom where I find it and when it looks ridiculous, I figure that the "saying" came about when it suited someone, long, long ago who was trying to get his kid to stop masturbating.
Its kind of how I view the Bible. Sayings, not particularly inspired. There may be some really good stuff, there may be some really true teachings, but it is all sayings that made the cut somewhere along the line.
FYI, hadith are not considered in any way inspired. Many give them (selectively, as they are wont to be selective) too much influence. I think a lot of the nonsense hadith were put in there to inspire a desired action by someone who wasn't otherwise compliant-until they are told that "the prophet said it to. .. .(someone respected who allegedly repeated it). Stupid game of telephone gone wild.