Ilegal weapons were weapons that were legal at some point, as criminals will get the easiest weapon to get a hold on. If you have a large market and number of legal weapons you can e sure that some of them will get lost or stolen either from the owners themself or shops, heck even from the US factories themself. So in the current state you have legal weapons to thank for supplying the ilegal trade.
And even more since the registered ammount of guns owned is way lower (logic...) then the ammount of legal weapons on sale or produced. So on top of the sold and owned ones you have the unsold ones just sitting in shops.
Making it to be a neverending circle. If you proper regulate the legal ones and in time try to reduce it's number paired with methods to stop ilegal trafficking the whole ammount of guns will go down, it will make them harder to come by, more expensive and decress the number of shootings.
But by reducing the number of guns that goes against what NRA stands for today, as they stand for the weapon manufacturers more then for the gun owner.