Are you talking about passenger railways? Everywhere I've lived in the US has had a railway running right through town. It's one of the few things the government can't just seem to reroute. But it is always freight rail
I was actually referencing public transit, but (poorly) chose to write "railways" last night because it rhymed with highways.
If you use your railways for passenger trains it is quite common to reroute the railways around towns to get higher speeds. Which has drawbacks and advantages. As a tourist I do not like it.