Final Fantasy XV is split into two distinct sections: the open world first half, and the linear second half. The second half doesn't offer much room for exploration, but a glitch, discovered by YouTube channel Fotm Hero, allows Noctis to go walk around and see what's out there.
Fotm Hero has uploaded two videos: One shorter video exploring Cartanica, and a much longer video exploring all of Niflheim.
It's unlikely these areas were ever meant to be explorable or filled with quests, but it is certainly a possibility. Future DLC may also fill these areas with content. The most likely scenario, however, is they were simply put in place to offer an interesting view from the train.