A little history...
In the late 80's and early 90's most larger, brand name gasolines had a nice amount of detergents to help keep engines (carburetors, intake ports, valves) clean, even though for the most part, carbureted engines were extremely tolerant of deposits. The Mom and Pop stations were cheaper prices, but zero detergents. Life was good because the majors could say their gasoline was better and the little guys could say their gasoline was cheaper.
Along came fuel injection and when injectors began to plug, they caused driveability problems. BMW was affected to a large degree, and they created a vehicle test, a performance limit, and a list of gasolines that met the criteria. This was also OK, because it was voluntary and for the most part, the majors could pass the test and further differentiate from the no-detergent gasolines.
Then California and EPA got involved because a stumbling, misfiring engine emitted more exhaust emissions. In the mid-90's they passed laws that required a minimum amount of detergents in all gasolines sold in the US. The minimum amount was that needed to pass the BMW injector deposit test. While the big oil brands were OK with this, the little guys now had to purchase detergent additives to be able to stay in business.
Two things happened. The little guys didn't care to put any more detergent in the gasoline than they needed to, so it created a LAC (Lowest Additive Cost) market. Additive companies developed detergents designed to beat the test (pass once out of many attempts, use a cleaner than normal base fuel, wait for a sweetheart test car...) And cheap additives entered the market. The other thing that happened was now that the little guys had some detergent, and a credible claim (we meet the EPA detergency rule; we pass the BMW test) the advertising became undifferentiable from the major brands that might have had 4 to 5 times the amount of detergent.
So, you're a major brand spending $60MM a year on additives and you can't communicate a performance message any better than Mom and Pop stores? You cut back on the amount of detergent!! And that's what happened - the little guys went up to the minimum amount of detergent and the big guys (most of them, don't think their accountants let them all hold out and keep a high additive treat level) went down to the minimum level. So most gasoline cleanliness performance of all gasolines in the US is the same (prior to this top tier list.)
Fast forward a little and injector deposits, warranty complaints, and in-the-field emissions checks have all gotten worse again. OEMs complain that their engine designs are good enough, but the gasoline is of poor quality. There were some base fuel changes during this time period that aggravated deposit levels, but the big problem was not using enough additive. So after some behind the scenes cooperation between some majors and some OEMs, they created the "Top Tier" system. It benefits the majors (and any brand that wants to make the marketing claim) because it allows them to differentiate again. It benefits the OEMs because they can direct consumers to better fuels to either prevent or clean up deposits and avoid or reduce driveability problems.
But!! For the most part, the base gasoline in a particular marketing area is the same, no matter what the brand. The difference between brands is the additive they use, not the base fuel they have. Big refineries produce gasoline, ship it via pipeline to here and there, and what you put in may not be the same gallon as what you get out. The pipeline companies ensure the quality of what you get out is the same as what you should have put in, but that's it. Base gasoline is a fungible product (i.e. commodity.) In fact, it is not until the fuel is loaded into the tank truck that the additive is mixed into the gasoline and the branded company takes legal ownership of the gasoline.
The additive amount in a gallon of gasoline is on the order of 0.002%. A common term is PTB, or pounds of additive per thousand barrels (lbs/42,000 gallons.) The cost to additize a gallon is on the order of $0.002 per gallon (also called 20 points, because 100 points = $0.01)
So back to the topic; Top Tier gasoline is indeed a step up in cleanliness. It is much more the result of detergent additives and far less of the base gasoline. Base gasoline does control the octane rating. So yes, Sam's Club gasoline will be the same base gasoline as Shell gasoline, but they'd use different performance level detergent packages.