Most suspect it's because Costco has higher-end merchandise, which attracts a higher-end clientele. But that's not why.

The main reason is because when I walk into a Costco store the people working there are happy. Good wages translate into happy employees, and happy employees make for happy customers. You don't have to pay Google wages to make this happen, but you do have to pay significantly more than the minimum wage, and Costco does that.

The Glassdoor survey of Costco wages show a pretty flat salary curve, with pay ranging from $10-$23 an hour for cashiers and just $22-24 an hour for supervisors. No position averages much more than $22 an hour, but none averages less than $11 an hour either. Even the guy who checks your receipt and the woman who sells the cheap hot dogs take home a decent wage.

Glassdoor estimates salaries at Sam's Club are quite different. Cashiers and other low-level employees make as little as $8 an hour, but supervisors take home an average of almost $50,000 a year, which comes to about $25 an hour.

It's not just that Sam's Club employees earn, on average, several dollars per hour less than those at Costco. There is a clear line between labor and management in every Sam's Club store. The line is blurred in a Costco store.

Is that communism? Some might say so. But based on the numbers, it's also good business. Everyone in a retail store is on the same team. Why should there be lines drawn between them?

And that's the secret of Costco. It is hiding in plain sight. What is amazing is how few retailers have copied it.

At the time of publication the author owned shares of GOOG and COST.

This article represents the opinion of a contributor and not necessarily that of TheStreet or its editorial staff.

Follow TheStreet on Twitter and become a fan on Facebook.

>>Read More: The Seven Deadly Sins of Biotech Investing

>>Read More: Palo Alto Networks Is Too Good to Be Left Alone

If you liked this article you might like

How to Get Rich Using Warren Buffett's Favorite Stock Market Indicators

Strange Days at Apple

How to Live Just Like Billionaire Warren Buffett

How to Make a Deal Like Billionaire Investor Warren Buffett

How to Invest Like Billionaire Warren Buffett