Participating in endurance sports requires two main things: lots of time and money. Time because training, traveling, racing, recovery, and the inevitable hours one spends tinkering with gear accumulate—training just one hour per day, for example, adds up to more than two full weeks over the course of a year. And money because, well, our sports are not cheap: According to the New York Times, the total cost of running a marathon—arguably the least gear-intensive and costly of all endurance sports—can easily be north of $1,600.

No surprise, then, that data collected in 2015 by USA Triathlon shows that the median income for triathletes is $126,000, with about 80 percent either working in white-collar jobs—professions such medicine, law, and accounting—or currently enrolled as students. Running USA surveys conducted in 2015 and 2017 found that nearly 75 percent of runners earn more than $50,000, and about 85 percent work in white-collar, service, or educational settings. A 2013 report published by USA Cycling shows much the same: More than 60 percent of individuals who compete in cycling events claim household incomes above $75,000. And though it doesn’t track employment, the same USA Cycling report shows that 66 percent of cyclists have at least an undergraduate degree.

There are a handful of obvious reasons the vast majority of endurance athletes are employed, educated, and financially secure. As stated, the ability to train and compete demands that one has time, money, access to facilities, and a safe space to practice, says William Bridel, a professor at the University of Calgary who studies the sociocultural aspects of sport. “The cost of equipment, race entry fees, and travel to events works to exclude lower socioeconomic status individuals,” he says, adding that those in a higher socioeconomic bracket tend to have nine-to-five jobs that provide some freedom to, for example, train before or after work or even at at lunch. “Almost all of the non-elite Ironman athletes who I’ve interviewed for my research had what would be considered white-collar jobs and commented on the flexibility this provided,” says Bridel.

Research published in the American Journal of Preventative Medicine found that low-income neighborhoods were 4.5 times less likely to have recreational facilities—like pools, gyms, and tennis courts—than high-income neighborhoods. In some low-income areas, less than 20 percent of residents live within a half-mile of a park or within three miles of a recreational facility. Compare that to the 98 percent of New York County residents and 100 percent of San Francisco County residents who live within walking distance to a park.

Even so, there are myriad ways for relatively comfortable middle-to-upper-class individuals to spend their time and money. What is it about the voluntary suffering of endurance sports that attracts them?

“By flooding the consciousness with gnawing unpleasantness, pain provides a temporary relief from the burdens of self-awareness.”

This is a question sociologists are just beginning to unpack. One hypothesis is that endurance sports offer something that most modern-day knowledge economy jobs do not: the chance to pursue a clear and measurable goal with a direct line back to the work they have put in. In his book Shop Class as Soulcraft: An Inquiry into the Value of Work, philosopher Matthew Crawford writes that “despite the proliferation of contrived metrics,” most knowledge economy jobs suffer from “a lack of objective standards.”

Ask a white-collar professional what it means to do a good job at the office, and odds are they’ll need at least a few minutes to explain their answer, accounting for politics, the opinion of their boss, the mood of their client, the role of their team, and a variety of other external factors. Ask someone what it means to do a good job at their next race, however, and the answer becomes much simpler.

“The satisfaction of manifesting oneself concretely in the world through manual competence has been known to make a man quiet and easy,” writes Crawford, who in 2001 quit his job in academia to become a mechanic. “It seems to relieve him of the felt need to offer chattering interpretations of himself to vindicate his worth. He simply points: the building stands, the car now runs, the lights are on.”

“I love the results—running faster, running longer, going after a clear-cut goal,” says Josh White, a biochemical engineer in Philadelphia who is also a competitive age-group triathlete.

Kalliope White (no relation to Josh White), a marketing professional in New York City, told me one thing running offers that her job often doesn’t is “methodical process and simplicity. Whether it’s an easy run or a tough workout, it feels good to lock into a pace and go for it.”

Another reason white-collar workers are flocking to endurance sports has to do with the sheer physicality involved. For a study published in the Journal of Consumer Research this past February, a group of international researchers set out to understand why people with desk jobs are attracted to grueling athletic events. They interviewed 26 Tough Mudder participants and read online forums dedicated to obstacle course racing. What emerged was a resounding theme: the pursuit of pain.

“By flooding the consciousness with gnawing unpleasantness, pain provides a temporary relief from the burdens of self-awareness,” write the researchers. “When leaving marks and wounds, pain helps consumers create the story of a fulfilled life. In a context of decreased physicality, [obstacle course races] play a major role in selling pain to the saturated selves of knowledge workers, who use pain as a way to simultaneously escape reflexivity and craft their life narrative.” The pursuit of pain has become so common among well-to-do endurance athletes that scientific articles have been written about what researchers are calling “white-collar rhabdomyolysis,” referring to a condition in which extreme exercise causes kidney damage.

“Triathletes who I interviewed for my research talked about how the pain that they experienced during training and racing was one of the primary reasons they did it,” says Bridel. “To overcome this pain and get across the finish line served as a significant form of achievement and demonstrated an ability to discipline their bodies.”

The great irony, of course, is that one of the main reasons people pursue education, financial security, and solid employment is to create comfortable lives. But for some, this can begin to feel like too much of a good thing. Endurance sports provide a necessary outlet, offering concrete measures of a job well done and the chance to deal with physical suffering—albeit in a voluntary, defined, and immediately escapable environment.

Brad Stulberg (@Bstulberg) writes Outside’s Science of Performance column and is author of the new book Peak Performance: Elevate Your Game, Avoid Burnout, and Thrive with the New Science of Success.