To me, that makes it sound like gain always means buy.
No, when you buy a card you gain it. However, there are many ways to gain a card.
Like in some other games, when you play a card, you discard it. That doesn't mean that the only way to discard a card, is to play it.