I'd be interested to see the statute on that. I highly doubt any state legislature would make a law banning returns on firearms or ammo. Hell, some municipalities have gun turn in day where they give you gift cards for your old broken guns. My bet is it is just a walmart policy some lawyer drafted to mitigate a perceived or real liability.
Here is a couple of questions for the OP:
How come I can carry a concealed weapon at Walmart, but if I want to buy a shotgun, the sales associate has to carry it all the way to the front door and hand it to me on my way out?
How come 18 year old kids can buy 22LR for a handgun, but they wouldn't be allowed to buy 357mag for thier Marlin rifle?