This is not true at all. Costco buys everything they sell.
> They often only pay the manufacturers after its sold.
This is true, and may be where your confusion lies. They buy on net 30/60/90 terms from their vendors. This means they have 30/60/90 days to pay them. Because they move inventory so quickly, they have often sold an item before they have to pay for it.
But they are still buying it and still taking the risk that it won't sell.
> And sometimes don’t return the units which don’t sell
This is only true because as I said before, they own the items.