>>18304703What nubs are you even referring to? Primitive limbs? The limbs from which the wings of flying vertebrates like bats, birds and the extinct pterosaurs were already fully functional limbs that they used for locomotion before they were adapted into wings.
As for the origins of primitive limbs, they emerged from the fins of the ancient fish (that resembled these things
https://en.wikipedia.org/wiki/Coelacanth ) which lived in a semi ambhibious manner and used their fins to drag themselves on the ground. Mutations that made these primtiive limbs/fins stronger and better usable for locomotion on land are obviously advantageous and thus selected for over millions of years leading to development of more derived and advanced limb structures.