Costco has employees that oversee the QC of these white-label products.
Intels high price chips, and low price chips are often the same chip except the low priced one failed quality control and had some of its circuits turned off.
Wikipedia article, as a primer: https://en.wikipedia.org/wiki/Product_binning
Does costco get some extra benefit if the consumer buys Kirkland from costco ?
Yes. Costco positions their store brand as a major part of their appeal. This attracts more consumers to their stores, which
A. Increases membership, for which there's an annual fee, and
B. Increases traffic, increasing sales of high margin items as well as the low margin store brand.
If they were to give away their reputation to other sellers by letting them sell their QC'd products, they would be lowering the value of their memberships.
a) To reduce costs by controlling the entire means-of-production
b) To ensure quality control on the product and build faith in the brand, which in turn
c) Pulls people into the store, forcing them to buy a Costco membership if they want the product.
For example, Kirkland coconut water is simply white-label Vita Coco, and the made by label indicates it is packaged for them by the same company that produces Vita Coco.