Factual error: Anne Margaret is seen changing into pants, and as she's shown stepping into the pant leg she is wearing white pantyhose. Pantyhose wasn't invented at this time.
Factual error: One man reaches into the fire chamber and picks up the trunk full of gold with no problem or effort. That much gold would be much heavier.
Answer: It was established that railroad tracks were put through the desert. Probably a shortcut to save time or it was the only area they were allowed to build. Land deals, claim jumping and protected grounds were a big part of where tracks could be laid. It was after the train disaster that the tracks were discontinued.