Of course, it costs money to create these cards, build out the tech stack behind them, deal with fraud monitoring, etc. I am sure many millions were spent on this and continues to be spent on it, yet the gift card is free. You don't need to pay an extra penny to use the card. That's paid for by people who don't redeem all the value on the cards as well as the spread between payment and redemption, so someone must have run the numbers and decided whether building this infrastructure is worth it.