It looks like the retailer is essentially selling a gift card that gets automatically credited to the purchaser's Amazon account via the barcode they present. I suspect the retailer is getting a small cut of the sale just like they do with normal gift cards. Some of those giant gift card stands rent space from stores and I suspect Amazon has a similar arrangement for this.
Well amazon isn't really competing with kum & go (a gas station) or grocery stores (yet). CVS, I would also say not a big competition--you primarily go there when you need a couple of items quickly.