In the 18th and 19th centuries, folks around the world got pretty worked up about the idea of self-pleasure. While masturbation wasn't exactly smiled upon in Judeo-Christian beliefs, the strict moral standards of the Victorian era, plus movements like the Great Awakening in America, really made it a really big deal.
In the USA, one of the loudest anti-masturbation voices was John Harvey Kellogg, a physician and devout Seventh-Day Adventist in, Michigan.
Besides managing a surgical practice, he was also the editor of Good Health. Unfortunately, the magazine also promoted eugenics and outdated anthropological concepts under Kellogg's leadership.
Kelloggs believed that sex, including masturbation, was harmful to physical, emotional, and spiritual health. He abstained from it himself, even on his honeymoon, spending it working on anti-sex literature. He and his wife maintained separate bedrooms and adopted 8 children while fostering another 34.