The word has been used to mean a Londoner - specifically one born within the sound of Bow Bells - since around the start of the 17th century. However, for about three centuries before that, it was simply applied to any mis-shapen egg, as the word actually meant "an egg laid by a male bird". Obviously, therefore,an unnatural thing!
Later, it was a word used by countrymen as a term of contempt for a city-dweller. The country folk, you see, considered themselves to be hardier than the effeminate milksops who lived in town!
Only after these contemptuous ideas behind the name did it become a term of pride to central Londoners. So, it has had a pretty chequered history.