Gifts don’t mean just one thing.
There is a variety of things you can optimize for.
For my wife, me getting her something she wants but wouldn’t get herself is the right gift. That, or something she wouldn’t have been able to find for herself.
Surprises are low on her list. Extravagant gifts are low. She would be the kind of person not to buy the coffee for, because she knows what she likes and if you bought her the wrong thing, the thought would count but now what do you do with this bad bag of coffee?
I’m the opposite. I care much more about the fact that you thought about me long enough to do something specific and special to me.