What happens to components which stop being manufactured?
The designs are still the property of the original owners, and they don't generally "release" them. If there were licensed or unofficial 2nd sources it's more likely that was initiated when the product was more active. 

I believe that sometimes a third party will buy up a quantity of dice and package them up as orders arrive. Running a few extra wafers at the twilight of the design life of a part may not be all that expensive. We buy a relatively expensive (some thousands of dollars) extremely specialized part where the original manufacturer has shut down their entire fab after making enough stock of bare dice for the foreseeable future.  

Also, grey market dealers may hoard last-buy and surplus parts, as well as parts removed from scrapped PCBs. These have dubious provenance at best, and may be counterfeit or fraudulent parts at worst, but they may be a last resort. Some of the dealers are much more reputable than others. 

Why would anyone want to buy old inefficient obsolete parts? Sometimes the cost of re-design or certification is so high that the end product will otherwise have to be abandoned. For example, when microcontrollers are obsoleted it can cause much gnashing of teeth, especially among smaller customers. This is particularly true when there is a technology and architecture shift such that there are no longer even somewhat compatible parts being manufactured.