Not everybody who gets out or retires will go to Airlines, but most who are current probably will. Military Pilot Retention and Airline Hiring are cyclical, but do not match up exactly. Military pilot retention starts to drop usually right before the Airlines start to hire, then the bottom drops out. And it continues past when hiring slows.
3 things that jump out right now.
1. Squadron Commander retirements at all time highs in Navy and AF.
2. Military downsizing via continuation boards, slowed promotions, and early out bonuses once again overeaching.
3. QOL for military pilots approaching an all time low. Less and less time flying, more JPME, staff work, PC nonsense, and Leadership failures.
Flying or an office job is an individual decision. But even the non current can get back in the game via regionals or ISR.