In many major cities with major marathons, organizations will hold an official pay-to-play 20 mile run 3-4 weeks before the marathon, to coincide with most participants’ final planned long run before their taper. The official events mark out a course and provide aid stations every 3K or so, much like an actual race.
Though these events are technically held and run like an official race, the clear idea is that participants will do this as their longest training run before the marathon, since most training plans typically ask for runners to peak with a 20 mile long run a few weeks before the race. The idea is not just so runners can do their long run with a like minded group of runners, but that they get support along the way with water and electrolyte sugar fluid every 3K or so, as well as the usual commemorative gear like a bib number and race shirt.
While I totally support the staging and usage of official 20 miler runs for marathon preparation (provided your training plan calls for said 20 mile run), there is a significant mistake most runners make when doing the 20 miler.