That has nothing to do with barrel length. .22 is a blow back, all the energy is right up in the chamber. If it wont cycle an 8inch barrel, it wont cycle a 20 inch.
So by your thinking, it wouldn't matter if the barrel was just 1"? You believe both the bullet and the bolt would both act exactly the same as on a 20" barrel?
What actually happens is that the bullet acts as a temporary "plug" whilst travelling down the barrel.
It has flown out of the barrel by the time the powder-casing has pushed the bolt back enough to reverse out of the firing chamber.
During the time the bullet is racing down the barrel, it is being pushed by the pressurized gases.
Those gasses act like a spring, a spring pushing against the the bullet, but also pushing the bolt backwards too, in an equal and opposite manner, as dictated by Newton's laws of physics. ("every action has an equal and opposite reaction")
Since the block is much heavier, and has it's own recoil springs behind it too, it takes longer to recoil backwards, giving the bullet enough time to clear the barrel, before unplugging the barrel.
So imagine if the bullet never left and the barrel stayed plugged? Then you'd get a face full of hot gasses at the ejector port. The bullet has to leave, it has to unplug the barrel, but not too soon, else the heavy bolt & recoil springs doesn't get pushed backwards for long enough, and it won't cycle reliably.
One might ask, "why not make the bolt & recoil springs lighter then?"
Well the recoil springs are responsible for stripping the next round from your magazine.
And I guess the block being heavy helps you feel less recoil sharpness, and it's momentum gives the bullet enough time to leave the barrel, before you get a faceful of hot gasses.
Other anecdotes to explain:
1) put a bunch of bullets in a campfire. They explode, but aren't really dangerous, the bullet, nor casing, do not fly outwards at deadly velocity. They need the barrel to focus, or funnel the explosion. Don't believe me? Then:
2) Inflate a balloon. Then either pop it with a pin. Or, let it go and watch the balloon fly around. The difference is the funnelling of the gases through a nozzle (i.e. barrel), vs. just having it explode in mid air and going nowhere (no barrel, or 1" barrel).
3) same with a space rocket. It can explode suddenly in all directions on the launch pad. Or, if the hot gases are funnelled in one direction, the rocket/bullet takes off, yay! But the bullet needs something to "push" against, which is the bolt and recoil springs. And it needs Time too, nothing happens instantly.
P.S. don't try 1) at home! This was actually a story told by our PAL instructor, of something he had tried with friends. And he might have put them in a flaming garbage drum instead of an open campfire...