It wasn't always like this. Until the 1980s, nearly all parts for warplanes, and military vehicles in general, were "MilSpec" (built to military specifications.) This meant they were much more expensive than comparable civilian items, but built for as long as their was a military need for them. As the cost of combat aircraft escalated, MilSpec was one of the things sacrificed, replaced more and more with COTS (Commercial, Off The Shelf) parts. While COTS was much cheaper, they quickly became obsolete and went out of production. You can see that in the personal computer market, where a microprocessor is obsolete after only a few years, and video cards often don't last a year before getting replaced with newer and better models. The warplane electronics designers quickly realized that if they did not use COTS, their stuff would be obsolete quickly, and enemy nations could quickly and cheaply build superior electronics. Fortunately, a lot of what made military electronics effective was not the speed or small size of its components, but how it was all put together, and controlled by software. Still, the faster, smaller and cheaper new components made a difference. The 1970s era F-15 fighter electronics were about 15 percent COTS. Most current warplane designs are over 50 percent COTS. It's a big problem.
These days, combat equipment is built so that it is easier to replace rapidly aging electronics with smaller, faster, more capable and cheaper new stuff. Still, eBay will continue, for a while, to be a regular source of spare electronic parts for military equipment.
It's getting more and more difficult to get spare parts for combat aircraft. The main reason for this is the rapid introduction, and turnover, in new technology. Because of this, cheaper and better components come into use, making older ones obsolete. That's a big problem for many military systems, which use a wide variety of electronic components for things like radar systems and cockpit controls. Those radar systems cannot be replaced every few years because some of the chips, and other electronic components, are no longer manufactured. But those chips, and electronic components they are a part of, can be replaced by new chips and components designed to do the same work as the old components. Making these substitute spare parts has become a big business, all because clever engineers are able to design and build small numbers of new replacement components for the military.