The marathon was an elite championship event for most of its modern existence. Turning it into a mass civic occasion happened within a few decades and changed the sport's economics entirely.
The distance was a spectacle, not a participation event
Early marathons were staged as feats, with small fields of specialists and considerable public doubt about whether running that far was advisable at all.
Entry was restricted, and the idea that thousands of ordinary people might complete the distance would have struck organizers as absurd.
The race existed to be watched, and its appeal was the endurance of a few rather than the participation of many.
The running boom supplied the field
Widespread adult recreational running created, for the first time, a large population trained well enough to finish and willing to pay for the chance.
Organizers realized that entry fees from a mass field could fund the event far more reliably than spectators or sponsors alone.
Once the finances worked, the incentive flipped from restricting the field to expanding it, and course capacity became the limiting factor rather than qualifying standards.
Routing through the city was the crucial change
Moving the course through downtown streets and residential neighborhoods rather than around a park turned the race into something a city experiences rather than hosts.
Spectators appear because the race comes to them, and neighborhoods develop their own traditions of music, signs and support at particular corners.
That is why big marathons feel like festivals with a race inside them, and why closing the streets is accepted despite the disruption.
Charity attached itself to the format
Guaranteed entries in exchange for fundraising gave slower runners a route into oversubscribed races and gave organizations a reliable annual campaign.
It also changed the meaning of participation, since a large share of any field is running for a reason unrelated to time.
The consequence is a race with two events happening simultaneously, a professional competition at the front and a mass endurance occasion behind it.
The model exported itself
Cities worldwide copied the format, and the major races now share sponsors, timing systems, elite fields and roughly the same weekend structure.
Local character survives in the route, the crowd customs and the finish, which are the parts that cannot be standardized.
What began as a test of a few athletes is now an annual civic event that most participants experience without racing anyone at all.

