Why does the U.S. keep thousands of retired aircraft in storage?
Some aircraft sold or loaned to outside military forces are built in batches. These aircraft stay in service for a longer period of time than those in the advancing military power, making spares very difficult to obtain and replacement aircraft for those lost in action are going to be impossable to get. I remember on 19 Squadron in RAFG Wildenrath (1979/82), the F4 Phantom was very demanding on which panels and parts would swop between aircraft. The Phantom also went through many states of evolution and when our Govenment decided it was cheaper to buy more F4 aircraft, they had to consider the spares, fitment and training that would be needed to keep our units similar. The Phantoms that were purchased I believe came from the boneyard.
Of course, the 'all out war' theroy also holds true, if a planet size war was to break out, and you recall all your old pilots.... easier to shove them in aircraft they flew 30-40 years ago than train them in the newer stuff.... going to get very messy up there and replacing pilots/ planes will be a priority, numbers can sometimes win wars. Life expectancy of our frontline pilots were 2/3 sorties at best, Ground crew in fixed bases were 2 days at most..... I miss the old days.