There are a number of reasons why spacecraft electronics typically lag what is commercially available by several years.
Electronics are very susceptible to radiation phenomenon that terrestrial electronics are largely protected from by the Earth's atmosphere and magnetic field. Common radiation-based failure mechanisms are Single-Event Event/Upset (SEE/SEU) — most commonly thought about as a flipped bit, latch-up — where a bit gets stuck in a certain state and the part needs to be powered down to be reset, burn-out — where a high energy particle (e.g. proton or neutron) destroys the part, and total dose — where long-term exposure (rather than a freak event) degrades the part. As chips and circuits advance and pack transistors more tightly, the probability of these events increases.
Several techniques and testing methods exist to demonstrate if electronic assemblies are robust in space radiation environments, but these tests are expensive. So once they've been done for a part, component, or assembly, the trade is often made to live with less performance and save the cost of re-testing and avoid the risk of complete mission failure.
It is easier to do maintenance on a terrestrial computer, and the costs of failure are often much lower than for spacecraft. Ground systems also don't have the same tight power, size, and mass budgets that space systems do, which limit the amount of redundancy that is feasible. A solution is to continue to use parts that have been shown to have high reliability. Another way to increase reliability is to perform parts screening and to perform lots of electronics testing (e.g. bake-out to find infant mortality, random vibration testing to mimic launch environments, shock testing to mimic pyrotechnic events like fairing jettison, and thermal vacuum testing to mimic space. This testing takes time and is expensive. The time delay alone puts most space systems at least one Moore's law cycle behind the latest consumer parts.
Build time for satellites
To say nothing of the avionics, satellites take a long time to build. Even when the computers are done the rest of the vehicle has to be assembled and tested. For large spacecraft this can take years. Meanwhile, the computer isn't getting any younger and an aversion (often justified) to risk means upgrading it would require many of these tests to be re-done.
Over time Moore's law helps chips to increase in processing power and decrease in power consumption, but generally speaking, when comparing contemporaneous parts more powerful chips consume more power. Spacecraft are almost universally power starved, so there's little incentive to use a more power-hungry chip than is absolutely necessary. Everything in a spacecraft is a trade-off: a Watt of power used for the main flight computer carrying around unused cycles is a Watt that can't be used for RF communications, or providing power to a payload (when that payload isn't communications), etc.
Paperwork and process can be as dominate as any of the other reasons. The aerospace industry as a historically high barrier to entry. Once reason is the human capital required to build and launch spacecraft, but equally as important is the space heritage of the software and components that go into them. Space environments are more challenging that terrestrial ones in a variety of ways and often require unique solutions (for avionics, rejection of heat without convective cooling is a good example). Launch environments were discussed above. Qualification of components is a real-world hardware-centric task, but there is a paper trail that backs up this analysis and provides confidence to a spacecraft builder's customers and the launch provider that the vehicle will be safe during ascent and that it will operate in space. This is proven through a combination of test and analysis and demonstration, but most of the people who care don't witness or oversee these activities directly, so they rely on excellent paperwork to provide that confidence. Once you've gone through the trouble of getting buy-in on widget X — the effort associated with a obtaining Δ buy-in for widget Y or even X+ is harder to justify if the older part still works. Aerospace suppliers (prime contractors and all the way down the supply chain) are often also required to have rigorous quality processes in place — i.e. more paperwork and process. All of this slows down the pace of innovation and change for in exchange for predictability.
Then once the spacecraft is ready it needs to be launched, and launches can slip months if not years.