You're correct that a 20gal isn't big enough. The fish you see in shops are juveniles, also the shops often have huge filtration systems and do alot of water changes.
On top of all that the tanks in shops aren't the fishes permenant home, so temporarily as a holding tank they are ok.
Long term you're looking at 50gal minimum to comfortably keep a parrot fish.
The inch per gallon rule is more of a guideline, and also still needs alot of interpretation to be used to any effect.
1" per gallon is for new/in experienced fish keepers and only refers to small bodied fish like neon tetras and kuhli loach. As soon as they start getting large/thick bodied such as clown loach and oscars/parrot fish, the rule no longer stands and has to be extremely altered to be accurate.
Most mature tanks with small bodied fish run anywhere between 1-2" per gallon. It really does depend on many many different things.