In the late 19th and early 20th century, many women were diagnosed with female hysteria, a generally vague affliction that could cause things like irritability and trouble making tendencies. (Male hysteria was also recognized but not as publicly and the treatment was usually just psychotherapy). Because the clitoris was not publicly recognized as a major point of sexual response, doctors would massage a lady’s happy button as treatment for hysteria. This was not considered a sexual act but probably a profitable one for the doctors as the massage was “treatment” and not a “cure” from some whack affliction
As this was pretty time consuming and could lead to some sore wrists and fingers, the vibrator was invented as a mechanical alternative. Once vibrators began appearing in “stag films” (porn!) and the sexual nature of the objects started to become publicly known, the treatment for hysteria was a little scandalized. Doctors definitely stopped giving clitjobs at that point but still kept selling vibrators. Did you know that you used to have a medical prescription to get one? I mean, in many parts of the country they’re still sold as marital aids.