Pilots also spend years logging hours in small airplanes, then regional airlines, getting paid relative peanuts, working crazy hours, rarely home, etc. before they land a high-paying job at a major national airline. And any hint of health problems, depression, substance abuse, etc. they fail their medical and it's all gone.