According to the first post in this SlickDeals thread, there is a $4.95 activation fee for each gift card, leaving with you a ~$5 profit.
ETA: Skimming further down the first page of the thread, other people mention different activation fee amounts, so it might not even be ~$5 profit, but I’m not interested enough to read the whole thread.
Those particular gift cards that Safeway is offering have a $4.95 fee per card. So essentially you are making a $5.10 profit on the two cards. Incidentally, the cards have no other fees and the expiration date is May 2020 (at which time they will replace your gift card for free if you haven’t used it up).
If you have a credit card that gives cash/points/miles/rewards for purchases, be sure to use that to purchase the cards. If you don’t use your rewards credit card to buy the gift cards, then you are giving up the opportunity to earn points on whatever you use the gift cards for.
But yes, it’s legit. Buy the cards and make a bit of a profit.
Look for the cards in the red cardboard package that have a picture of a silver box with a bow on top and a picture of a Visa gift card in front of the box. Don’t get the variable load ones (the ones where you can choose the amount) – get the fixed $50 ones.
However, all your card issuer will see is that you made a $94.90 purchase at Safeway. They will have absolutely no way to know if that was for a gift card, diapers, or beer. Trust me on this, if your card issuer gives points for other purchases at Safeway, they will give points for purchasing gift cards at Safeway. (Safeway may not accept credit cards for purchases of some rechargeable debit cards like the Green Dot cards. In certain stores where there has been a lot of fraud, the manager may make a local decision restricting credit card purchases.)
In quarters when credit cards are giving out 5% bonuses on grocery stores or drug stores, I go to them and stock up on gift cards to last me a long while.
But, yes, if you go to someplace like Western Union or a bank to get a gift card or money order, you won’t get points for it.