That coupon was not worth $3 to Walgreens, but you got Walgreens to take a $3 loss when they refunded you $3 more than you actually paid. Is that your idea of fair?
The manager of that store may believe it is better not to argue with a customer, so he gave you $3 you really were not entitled to. Some stores really want to keep customers happy, even if they lose money.
I've also returned things I've bought with a coupon. I would never expect, or ask for, more of a refund than I actually paid for the item. In my mind, that would be dishonest on my part. I also consider that the coupon was used at time of purchase and I would not expect to get it back. At times, I've regretted the loss of the coupon because I might want to repurchase the item in the future, or at another store, or something like that. But I wouldn't expect to get my coupon back unless I returned something immediately. If I got into my car, looked at the item, suddenly realized I bought the wrong one, and went right back into the store for a refund (if I couldn't get an exchange), I might try to ask the cashier for my coupon back. In that case, I think they might give it to me. But, once the cash register money tray is changed (when a new cashier comes on), the coupons are probably taken away with the cash drawer. Once my coupon is gone from the register, I'd consider it lost to me.
The issue of whether the retailer might profit from hanging on to my coupon would never occur to me, nor would it bother me. I save a lot of money using coupons and buying things when they are on sale, so I figure I come out ahead anyway. I also have enough to think about without worrying about whether the store might make a few cents on a coupon.