The English built the first railroads ( including exporting to America) and they used a certain width. Why did they use that width? 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 that were used for building wagons which used that wheel spacing. Why did wagons have that particular odd wheel spacing? Because older wagon ruts throughout England used that spacing, and if they changed it, wagon wheels would break by either falling into or being forced out of the old ruts, which were 56.5" wide. The old ruts were that size because the roads were built by the Romans, who arrived in England in 54 BC and left about 400 AD. Their wagons, and their chariots before their wagons, used that spacing, and that spacing was used all over Europe and wherever Rome conquered, because their wagons used the identical wheel base everywhere. So the modern railroad track width derives from the Roman chariot. Why was the Roman chariot track width 56.5"? Because that was the width of a chariot that would equal the width of two "standard" Roman horses. Thus, wagon and horses would fit through the same narrow street. Specifications and bureaucracies live forever!
The railways of the world are based on two horses Arisses.