As a consumer, the advantage to Costco is they've done the product filtering for you. You can reasonably bet that whatever Costco has is in the upper echelons of good within that product category. Costco also ends up being cheaper if you do enough shopping there, because Costco's low prices are realized by the membership fees comprising the lion's share of their revenue.
As a merchant, Costco is significantly more efficient than other retailers due to a much leaner and simpler inventory because they only ever sell one or two brands of a given thing and only one or two things of a given brand. They don't have to deal with the overhead of unmoving stock, micromanagement of stock, and other such inefficiencies of non-scale.