Costco does make a profit on each item sold (usually), though a lot of their profit comes from membership fees. While they might lose on customers like you, they win on a lot of others, including some folks who shop rarely or never, there are quite a few of that type. They are brutal negotiators on price, even with larger companies like where I worked. And if you don't play ball, they drop you, which is devastating. You'll notice they usually carry two brands for many staples, Kirkland, their own, which often is very good, and then the leading brand. Look at what kinds of toilet paper they offer, two brands. Diapers, two brands. I was around when they dropped out brand of diapers, it resonated heavy.
They get incredible deals from producers and pass them along efficiently. They also pay their employees very well which shows up in customer service. We really like shopping there. We go in for maybe ten items and come out with 50. Their wine prices are excellent, unfortunately.
My financial advisor didn't want to buy stock in Costco because they are so expensive, but when I took over I bought some, and it has done very well for me.+