Railways are very useful even without import/export. They transport raw materials and goods. Thus you can
1. connect 2 industrial zones while one produces raw materials (oil, ore, wood, agri) and the other is generic and produces goods.
2. connect industrial and commercial to reduce the traffic between industrial and commercial.
And you can connect a cargo harbor/cargo hub with the railway if you have access to water for import/export.