The US standard railroad gauge (distance between the rails) is 4 ft 8 1/2 in (1.44 m). That’s an exceedingly odd number.
Why is that gauge used? Because that’s the way they built them in England, and the US railroads were built by English ex patriots.
Why did the English build ’em like that? Because the first rail lines were built by the same people who built the pre-railroad tramways, and that’s the gauge they used.
Why did *they* use that gauge then? Because the people who built the tramways used the same jigs and tools as they used for building wagons, which used that wheel spacing.
OK! Why did the wagons use that wheel spacing? Well, if they tried to use any other spacing the wagons would break on some of the old, long distance roads, because that’s the spacing of the ruts.
So who built these old rutted roads? The first long distance roads in Europe were built by Imperial Rome for the benefit of their legions. The roads have been used ever since.
And the ruts? The initial ruts, which everyone else had to match for fear of breaking their wagons, were first made by Roman war chariots. Since the chariots were made by or for Imperial Rome they were all alike in the matter of wheel spacing (ruts again).
Thus we have the answer to the original question.
The United States standard railroad gauge of 4 ft 8 1/2 in derives from the original military specification (MilSpec) for an Imperial Roman army war
MisSpecs (and bureaucracies) live forever!