Earlier quoted context omitted.
It's simple, Costco actually buys the inventory, and resells it. There are more advanced kinds of agreements (like buy back X number of coats of you sell less than Y) but that's largely how they operate. Amazon is much more like a digital mall in that they rent out their store features for sellers. However, Amazon would like to be seen by the customer as Costco and this causes dissonance between how they treat seller…
Okay, you've described the business models, but so what? In both cases, they still use the sales data available to them to create and sell their own products at the expense of third party sellers. In Amazon's case, that means diverting customers away from third party listings to their own. In Costco's case, that means making fewer purchases from third party sellers because the amount of shelf space available decrease…
The difference really comes down to three things: the layer on which the competition occurs, whose data is being used, and whether the competition is fair (which comes down to risk/reward).
At Costco, the competition occurs between manufacturers. Costco uses its own retail data as a retailer. The risk to the vendor to sell at Costco is marginal (even if they have to pay for shelf space) compared to being in the market at all. Costco can compete with a store brand, but if they want to sell the vendors products they have to go to the vendor. They can't undercut the vendor with an equivalent product unless they make an equivalent product for cheaper. The risk is spread out and Costco owns a healthy amount of it.
At Amazon, the competition occurs between retailers. Amazon uses its competitors data, which it gains by being a 'marketplace'. The other retailer carries all the risks associated with being a retailer. Amazon takes a piece of it, the size of which depends on what 'services' the retailer uses through Amazon's marketplace. If the retailer fails, Amazon loses nothing. If the retailer wins, Amazon can use the retailers' data and begin selling the same product. It can use its size and the retailers' own numbers to get a better deal with the vendor and undercut the other retailers price on the same exact product. (Store brands are also an option and an issue, but if you're focused on that, you're missing the forest for the trees.) The retailer takes the vast majority of the risk, but Amazon can, at its option, swoop in and take the majority of the reward.