This leverage all has to do with the product, how close you are to it and how valuable it is. FAANG product is valuable, but the programmers are still just creating it and usually a small part of it at that. Pilots are the product when the product is "get plane to destination" they are the 1 or 2 people providing that product (ok service). Athletes are the product of sports. It's very valuable and there's only a dozen or so of them to deliver.
Now, using the leverage is the difficulty to unionize. Athletes are a tiny group, pretty easy to organize. Pilots are a small group, also pretty easy to unionize. The fact they have to be licensed means there is a record for all the people needed pull in. Software engineers seem to be 5x-20x larger population than commercial pilots (quick/rough searches). They have no certification or registry organization and have no common affiliations. It's incredibly difficult to organize this group. There's also no regulatory capture requiring developers to be US citizens so, if you did unionize and tried to negotiate too hard the industry would just move away from the US so there's just not a lot of leverage this profession has.
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.