The fact is, railroad tracks are private property and only persons authorized by the railroads can be on that property. Many thousands of people have died thinking they would be safe around railroad tracks. Railroad bridges often times look like a convenient way to access a favorite fishing or hunting place. They don't look dangerous just standing there when no train is present. Even if there is a maintenance walkway, it's not far enough from the rails to keep you from being struck by the train.
Railroad tunnels pose similar hazards to railroad bridges.
There's no sidewalk and you can't move fast. Railroad tracks are often used by joggers, hikers, people walking their pets, or as a pathway to ride motorcycles or other all-terrain vehicles plus a wide variety of other activities. Many joggers, for example, run with headphones and never hear the engineer's warning. Motorized vehicles also drown out the locomotive horn. Many people that do hear the warning fail to escape the danger.