@shewolfnm,
I agree that being near a train track and being stupid aren't some sort of equation. On the other hand.. I'm concerned about the compulsion of some. And who are the some? Add the compulsive some to the very stupid and there's a reason for the law.
Some while ago, I was at a lunch birthday gathering where one of the women told about being in a hotel high rise in Acapulco, going out on the balcony, and suddenly having a compulsion to jump.. which as the story went on, she thwarted by praying very hard while backing up. I can almost understand that, the compulsion part. I figure that can happen on bridges, know it does in subway stations, and it might, not for killing yourself but for a risk game, with railroad tracks. Or maybe some do also do it for suicide.
Me, I love trains, but I'd just as soon see them going by when I'm further away than a few feet, getting a wider view. Mostly I'd like to be on the train going somewhere.