The US standard railway gauge is 4 feet, 8.5 inches. They are this wide as in the United Kingdom, the railway gauge is also 4 feet, 8.5 inches. As we all know the US and the UK had a little argument which resulted in the US becoming
a strong independent black woman its own nation. After the UK built its first railroad in 1825, the US followed suit in 1827. When the UK went to build their train cars, they went to carriage makers who made carriages for horse-drawn buggies and carts. Instead of making new designs, the manufacturers took their old designs and built train cars based off of those which, of course, could fit on the 4 feet, 8.5 inch rails.
NOW Why is the 4 feet, 8.5 inch design so important? Well all of the roads and paths in the UK had ruts in them from hundreds of years of carts going through them. Riding outside of these ruts would result in a bone-jarring ride and a high probability of your cart breaking. So, as these carriage makers built carriages, they were practically forced to build their wheels 4 feet, 8.5 inches apart as otherwise their product would be useless.
NOW Why do these roads have ruts in them and why are they a uniform size? The Romans of course! When the Roman Empire ruled the entirety of Europe barring Germany, parts of the middle east and those dudes up in now what is Scotland, they got around using horses pulling carriages. What first inspired this of course was the creation of a horse-drawn carriage. Chariots first inspired this and then finally some bloke came to the realization that "Hey! We should have horses pull carriages and carts!" Some slightly smarter bloke came along and said "No, we should have TWO horses pull the carriages and carts as they wont be as tired and we can travel farther distances!" To make this work though, those carts would need to be made wide enough for a wooden arm to come out and latch to the horse. When doing this they had to make the cart wide enough for the arms to fit around the width of the asses of two horses. This happened to be around 4 feet, 8.5 inches and as this became popular, ruts with a width of 4 feet, 8.5 inches started forming which eventually became the norm so when the British wanted to make fancy carriages they had to conform to the ruts in the road and when they wanted to make trains the carriage makers used their old designs to make the train cars which the US went on to copy.
TL;DR: Because it is the rough size of the width of two horse asses together.
Source: reddit post