I disagree that they are for minecarts. It's plausible that the tracks far out are for minecarts because there are some mines nearby, and they are talked about in the Amajina & Sons sidequests.

But that doesn't explain the one right next to town. There is like a train station outside of Ul'dah (think about the place where that guy gets assassinated). I don't believe there are any mines near there at all. To me they seem like Train Tracks but there is little to no indication of where they go or what they're there for.

The Garlean Empire has train tracks in Castrum Centri and they are talked about in the storyline. We have never seen their trains, but we do know that they exist. I would guess that Eorzea has train technology as well.

For some reason I remember them talking about trains around the Ceruleum Processing Plant as well. There are a bunch of areas inaccessible on that map but are quite visible if you look down.

I have a feeling they were gonna add trains and stuff to the storyline but they never finished it or they decided to cut it out. Perhaps they are relics from before the Calamity? I'm not sure because I didn't play during 1.0. Does anyone remember trains during the 1.0 era?