|Click any image to enlarge
It was thought that the very act of riding a train could trigger such behavior, From Atlas Obscura:
As the railway grew more popular in the 1850s and 1860s, trains allowed travelers to move about with unprecedented speed and efficiency, cutting the length of travel time drastically. But according to the more fearful Victorians, these technological achievements came at the considerable cost of mental health. As Edwin Fuller Torrey and Judy Miller wrote in The Invisible Plague: The Rise of Mental Illness from 1750 to the Present, trains were believed to “injure the brain.” In particular, the jarring motion of the train was alleged to unhinge the mind and either drive sane people mad or trigger violent outbursts from a latent “lunatic.” Mixed with the noise of the train car, it could, it was believed, shatter nerves.There was also a concern that insane asylums were often situated close to rail lines and that escaped inmates would gravitate to the trains to escape the area and cause all manner of mischief in the process.
In the 1860s and ‘70s, reports began emerging of bizarre passenger behavior on the railways. When seemingly sedate people boarded trains, they suddenly began behaving in socially unacceptable ways. One Scottish aristocrat was reported to have ditched his clothes aboard a train before “leaning out the window” ranting and raving. After he left the train, he suddenly recovered his composure.
Finally, trains allowed women to travel alone, and so there was an aura of sexual danger in riding them. From the same article:
After going on a particular train ride, female novelist George Eliot stated with tongue firmly in cheek that upon seeing someone who looked wild and brutish, she was reminded of “all the horrible stories of madmen in railways.” Elliot seemed to relish the excitement of a possible confrontation and sounded rather disappointed when the figure turned out to be an ordinary clergyman.