The difference is that train tracks are designed primarily for trains. Before cars existed, streets were primarily for people and horses. Cars were, as the title of the article suggests, intruders into this space. The push to popularize the term jaywalking was an effort to reframe streets as a space for cars first, where it's the responsibility of pedestrians to stay out of their way rather than the other way around.