Amazon is where I go to buy books (and obscure one-off things that I can't buy from anywhere else). When buying from Amazon, I have to read the reviews, analyze them to figure out if the reviews are fake, read the return policy, research the seller, figure out the shipping dates etc. Given how broken the search is, I am not even sure if I am buying the best item in the category. Most of the time I end up reading wire-cutter reviews before buying from Amazon.
Amazon has billions of items at this point, and it is on me to figure out the right stuff that I should buy. I don't have that kind of time or patience to read hundreds of reviews before buying every single item.
Compared to this, Costco is a breeze. If they carry it, I just buy it assuming that it is going to be good quality. For me, the value they provide is curation of selection and filtering for quality. I am willing to pay the membership fee for this.
And this is anecdotally true for almost all of the families in my friends group in the Seattle area. I can see the perspective that if you don't have a family, the savings are probably not a big deal. And I also agree that there are people who don't want to drive to a store to buy stuff. But, I for one, am glad that Costco exists.