The military GME system works the way that the civilian GME system used to work about a generation ago: you initially apply for just your intern year, and then at the end of your intern year you apply again for residency programs (what you mean by 'the rest of residency'). If you are not selected to continue residency you do what is called a general medical officer tour, or GMO, instead. In the Air Force General Medical Officers are almost exclusively flight surgeons. Unless you fail out of residency, you can't be 'pulled' from residency to be a flight surgeon at any time other than in between your intern year and GME 2. You also can't be pulled midway through a fellowship. Again, you CAN fail out, but that has nothing to do with the AF's need for flight surgeons,just your own medical inadequacies.
How likely you are to be selected for GME 2 depends on the residency you want. As a general rule the more competitive the residency the more likely you are to need to do a GMO tour between intern year and GME 2. For some of the least competitive residencies (FP, Psych) there are opportunities to apply for 'catagorical' residencies, meaning you're guarenteed straight through training just like in the civilian world, rather than having to apply for GME 2. At the other extreme, in the Navy Emergency medicine actually had a 0% of the interns given straight through training (EM is crazy competitive in at least the Army and Navy, not sure about AF). Right now in the AF about 30% of physicians serve a GMO tour overall (I think, I'm actually Navy, and just an MS2).
I'm not sure about the AF, but in the Navy physicians are selected for GME 2 on the basis of a point system. Your given points for research, grades, USMLE scores, the recommendations of you residency director in internship, prior service, etc. Whoever has the most points gets the GME-2 position. BTW doing a GMO tour doesn't guarentee you straight through training when you're done, it just adds more points. If your application is bad enough it's very possible that the military will NEVER want to fully train you in your residency of choice, you'll need to wait to finish your obligation and then get trained in the civilian world (make sure you have the Montgomory GI bill, if that happens, you can apply it towards your pay). Also, be aware that your obligation to the military at the end of your residency will always be, at a minimum, the length of the residency you just completed, so if you just did a 3 year GMO tour, only owe one more year, and then start a 4 year GME-2 like ortho at the end of your residency you're going to owe 4 years, just like if you'd had straight through training.
Yes it adds time until you can start your career. Yes it sucks.