I used to participate at wine.woot.com before Amazon bought woot and shut down wine.woot. There were several vintners who were active on the discussion boards there. Many of their offerings were half (or even less) than the bottles sold for at a wine store. They commented that there was so much markup between the winery and the shelf that they could sell their juice on woot and make just as much, or more, money selling on wine.woot as they could in normal channels. Another bonus is that they didn't have to go touring to wine competitions or visit sommeliers to flag their product. At wine.woot, they could sell to a knowledgeable audience just by participating in discussions on days when their offerings were featured.
I suspect that similar things are going on with Costco and their branded wines and spirits. They are buying direct and in bulk, then selling in the stores with Costco's already low distribution being the only cost between the producer and the buyer. Everyone comes out ahead except for the entities that are in the middle of the typical distribution chain.
Though, I wonder how that works in states where the alcohol wholesalers have used their influence (i.e., political donations) to require that alcohol products move through wholesalers.