Back-to-back long runs build the legs a single long run cannot
In marathon training you do one long run a week. In ultra training the workhorse is the back-to-back: a long run Saturday, then another long run Sunday on tired legs. That second day, run on legs that are already cooked, teaches your body to keep moving deep in fatigue, and that is exactly the state you race an ultra in. A common build is a long day and then a second day at roughly 50 to 75 percent of the first (run 4 hours Saturday, 2 to 3 hours Sunday), and you schedule them every two to three weeks because they take a lot out of you.
This also means you do not have to run the full race distance in training. For a first 50K, two or three long runs in the 20-mile range, or up to about 4 to 5 hours, plus your back-to-back weekends, builds more race-readiness than one giant 31-mile grind that wrecks you for two weeks.