It seems pretty clear to me that it suggests that the same hormones responsible for all that new hair growth in boys – face, armpits, and the groin – must be carried by the semen, produced (like the testosterone) in the testicles. Therefore the semen will probably carry the wherewithal to grow hair, and it ends up in the palms of masturbators because… well, it’s obvious.
I doubt if anyone ever seriously suggested that this was true – it’s Weird Folk Medicine. Like Folk etymology, based on half-baked logic. It also provides a great setup for the joke – You tell the victim “Do you know that masturbation causes hair to grow on your palms?” , then wait to see if he looks at his own, and call him on it if he does.
Lastly, I have to point out, relevant to Baldwin’s comment, that in his novel Dracula , Bram Stoker says that the Count DOES have hair on his palms. I think it’s really supposed to sho his link to the lower creatures, but maybe he had something else in mind. This little detail never made it into ANY of the stage plays or movies.