Seldom
2
What do you expect to accomplish with this? Assuming you can select all the railroads in JOSM and change their type to something routable, you’ll still need to make sure that all the connections between lines are routing nodes. (lots of work I expect). And when you get that the routes won’t be meaningful, because the railroads won’t necessarily follow the shortest distance or the fastest time between two points of your choosing, as would make sense in a highway network.