For instance, Wal Mart makes more money if you shop their frequently. They have a vested interest in selling you products.
Costco makes their profits off the membership. So whether you shop there once a year or once a week, they continue to get that membership revenue.
On a side note, I wonder if that's the reason that lines at Costco are so miserable and their hours are so short? Perhaps Costco would prefer that you just stay home? Conversely, my Wal Mart is open 24hrs a day and the checkout process takes a couple minutes.