I believe that .177 is actually a descendent of C19th Flobert parlor or gallery rifles by way of Zimmerstutzen rifles.

The Flobert used what is essentially an empty rimfire cap with just the primer to shoot a 6mm BB a short range indoors, for training/entertainment.
This was refined in Germany where the size of BB was reduced to gain more accuracy eventually settling at 4.3-4.5mm as most popular in the Zimmerstutzen parlor rifle.
This smaller calibre was then adopted by BSA at the very start of the C20th in their first rifled airguns, as No1 bore, and became the accepted calibre for Olympic/World cup competition.