All the comments appear to be US centric, but Costco is also in other countries. So to tell you about the UK:
Here membership is unusual in that it isn't technically open to everyone, it's business and certain professions: https://www.costco.co.uk/membership but in reality anyone who wants to join can find a way.
Also no mention in the article of non-food. In UK Costco is known for special offers on electrical and white good and more. And cheap car tyres iirc
In the UK not everyone drives like USA and Costco's are few and far between, so that limits who shops there. So a niche player compared to the Supermarkets for consumer shopping.
And people also have smaller homes compared to USA and smaller families maybe (or smaller portion sizes...!), and Costco here is more geared towards selling in bulk, and to corner shops and other small businesses. It's more of a hybrid Wholesaler.
That's interesting, what do people have to do to get membership?