I'm really not sure what information I'm giving up by scanning a barcode on a card that the store gave me. Obviously they can use that to record my purchasing history, but they can do that anyway through a myriad of other techniques.
I'm not naive enough to believe they don't sell consumer data - but one reason would be to ensure you keep shopping at their store instead of a competitor's store. After all - that nearby store might have milk but they don't have milk with a $1.50 "club discount"!
The barrier to joining is a small hassle but it does exist. There is a Ralphs and an Albertsons near my mother but because she's part of the Albertsons Membership Club (or whatever it is called) she almost never shops at Ralphs as a result because the slight barrier to also joining the Ralph's Club is too high.