The warning that masturbation will make you go blind has been around since (literally) ancient times. It's been repeated over generations because it's an easy way to avoid saying anything else about it. Even in modern times, when we know there's no truth to the connection between self-pleasure and blindness, it gets repeated as a joke anyway. The old wive's tale got an occasional boost from what was considered scientific literature at the time.
In 1712, Dutch theologian Balthasar Bekker published a monograph with the succinct and catchy title, “Onania, or the Heinous Sin of Self-Pollution, And All Its Frightful Consequences, In Both Sexes, Considered: With Spiritual and Physical Advice To Those Who Have Already Injured Themselves By This Abominable Practice.”
In it, he claimed that masturbation leads to “disturbances of the stomach and digestion, loss of appetite or ravenous hunger, vomiting, nausea, weakening of the organs of breathing, coughing, hoarseness, paralysis, weakening of the organ of generation to the point of impotence, lack of libido, back pain, disorders of the eye and ear, total diminution of bodily powers, paleness, thinness, pimples on the face, decline of intellectual powers, loss of memory, attacks of rage, madness, idiocy, epilepsy, fever and finally suicide.”
It’s a list of ills that might well make a person consider themselves lucky to only lose their eyesight.