That and geography. Mobile Bay is a big indentation in the coastline and a major seaport. Bridges needed to be placed above the head of navigation for oceangoing ships. The highways take shortcuts via tunnels that are not available to trains. However, there should have been a rail shortcut from Bay Minette to P'cola rather than having to make a hard right turn a Flomaton.
Growing up in P'cola, my family would normally drive to Flomaton to catch the L&N Humming Bird to Chicago because the connection at P'cola was so bad.
Well, my wife is from Pensacola, I have one child, two grandchildren, one great grandchild and some in-laws in Pensacola, so I have been going to the place regularly for the last 50 years and was recently there to see the other grandchild there get married, so I do know a little about the area.
If we wanted a high speed passenger link it should make a hard right turn just out of Mobile station wherever that happens to be and go into a tunnel under the Mobile River, pop up onto a low level bridge more or less parallel to I-10 and follow I-10 the rest of the way to Pensacola. If we want to simply provide a more direct railway line, then it should start from the east end of the current CSX series of bridges across the streams and rivers flowing into Mobile Bay. This would be at just east of the Tensas River bridge, at about Perkins Hurricane Landing. There are two drawbridges in this section, a vertical lift in the bridge over the Mobile River and a swing span in the significantly longer bridge over the Tensas River. The line would go in a generally ESE direction, passing south of Bay Minette AL and meeting the former BNSF former Frisco line into Pensacola just east of the Perdido River crossing which is at about Muscogee FL, near the FL state highway 184 crossing of the Perdido River, which by the way is not a major stream. It would then follow or use the ex Frisco line the rest of the way into town, needing a connection to the CSX line somewhere in the area where these lines are parallel, one on each side of US 29.
I played with these routes on topo maps, but this was something like 40 years ago, so I don't remember the exact distances involved, but the Tensas River to Perdido river line would have about 2/3 the length of new line and be well under half the cost of the more direct line paralleling I-10 because there would be no significant bridge work. Total Mobile to Pensacola distance would be in the range of 5 to 10 miles longer than the shorter line, but still would still be well short of going via Flomaton. The Mobile to Pensacola rail distance could be reduced by about 10 miles by simply going onto the ex-Frisco at Atmore AL and building the connection between the two lines mentioned previously. (The two railroads do not directly connect to each other in Pensacola, itself. Interchange between the two is awkward.)
Back when it looked line SCL / Family Lines was upgrading the P&A route they may have been willing to kick in some serious money for the Tensas to Perdido line.
The tunnel would be little more than the sunken tube type tunnels that are currently in place for I-10 and the older Bankhead tunnel, so there is no technological or engineering stretch to building a rail tunnel, nor the connecting low to mid-level multi-span bridge across the upper end of Mobile Bay parallel to I-10. The tunnel would be short enough that would be no significant ventilation requirements, nor would there be any real structural or technological challenges in the extensive bridge work.
(PS: I thought the Pensacola to Flomaton connection to the Humming Bird was a dedicated bus. The Bird was gone before I had any connection to the place.)