Amazon does not purchase most of the inventory listed in its search results.
Retail stores actually buy (almost) everything they sell (albeit at lower "wholesale" prices), and "resell" to end customers. So when a retail store stops carrying a product, they stop buying the product from the supplier, and that is always because the item was not profitable to sell.
(In rare cases, they sell on consignment, but such arrangements would apply to less than .001% of products sold at retail. Selling on consignment has a whole host of separate issues, which is why it is so rare even though it would seem most profitable to retail stores.)