No, not by law. If it's a private club like BJs or Sams Club, though, you signed a contract that you would do so.
However, IMO it is totally not worth the hassle to put up a fight over this. Maybe if the line was insane and my toddler was haing a meltdown, I'd skip the line. But really, I usually pick my battles and this isn't one of them. It doesn't seem to be an issue around here, though -- I'm starting to think some of you live in the ghetto. I shop at Target, Wal Mart, and all the usual places that get complained about here and I have never been asked for my receipt except once at Best Buy (and yes, the guy saw me check out -- I rolled my eyes at him, and held the receipt that had been plainly visible in my hand up like three inches from his face in case he was legally blind or something -- he wasn't and seemed kind of sheepish after that).