They aren’t getting any money directly. They are having people watch other people play the game. Once you’ve watched long enough, it appears in your collection. If you have a subscription, you can let it follow you around.
If someone resubscribes just for an alpaca pet, that is a bonus but Blizzard isn’t making money off the pet.
When a charity event ends and Blizzard sells the pet for $10 in the digital shop for eternity, they are making money. And they have almost always done this. Only recently have they started taking items off the digital shop to give them away like this.
Corporations have no morality. They have one purpose and that is to increase value for shareholders by selling goods and services.