Having hiked the PCT in 2009 and being a kind of armchair psychologist, I have a lot to say about this topic. I met a lot of folks on the PCT last summer and met different categories of people with different paths to thru-hiking:
1. Student stage (can occur at any age as long as person doesn't "settle down"): work at disposable jobs, live frugally, save up over the year for the thru-hike, then quit job. After hike, look for new job (some people this season spent months and months looking for work!). For most people, this is a temporary way of life until they settle down. But you can keep it up for several seasons in a row for sure. To see your PCT pals, you'll just have to go back and hike the PCT again, or maybe the CDT!
2. Once-in-a-lifetime thru-hike: anybody can do this. Just save up money, quit or suspend your job, and do it!! Maybe you'll get a chance a few years later to do an other one, maybe not.
3. Outdoor professionals — guides, foresters, rangers, ecologists, bird-banders, geologists, etc. For these people the thru-hike even kinda relates to their job. Their work allows them to do this kind of thing often, and a thru-hike fits neatly into their other activities.
4. People with savings or passive income: build your own business, then hire a manager or put it on hold, or work hard at a high-paying job for 5-10 years and save 80% of your earnings, then do what you want for the rest of your life as long as it's not too expensive, or find some other way to generate passive income of no less than $500 a month to finance your wanderings. Can thru-hike indefinitely.
5. Professional athletes: the trail is your job, albeit a fun one — as long as you remain sufficiently unique to attract sponsors.
Ultimately it seems like the freedom to thru-hike depends on one's ability to control their finances. There may be other factors that you can't control like family demands, health issues, etc., but finances are usually the crux of the matter.