A large part of what you see on shelves are not the retailer's, but are on consignment from the manufacturer.
The manufacturer also pays for the product to be displayed, with different rates for different positioning.
The limit is physical space on the storefront, and that's a problem that Amazon doesn't have.