Anon. The answer is already in your comment.
Licensing. This is where the merchandise manufacturer pays the publisher/creator for the right to use their IP. This is the basis where they claim it is "official merchandise", they paid the licensing fee, the publisher/creators are getting money for it and therefore they give their endorsement to the official goods.
This is the portion of your money that directly flows to the creator/publisher, how do you need more explanation on how this works??
Not only that, but the more popular a series is, the more manufacturers want to sell official merch, because they won't pay licensing for something that nobody will buy. So the amount of money the publisher/creator directly gets from licensing also tells them how well that particular IP is doing. If the goods are selling out everywhere then it must be super popular, so then it's in the publisher/creator's best interest to extend another season, another arc or another game/sequel to keep interest going so that they can sell another licence. And that's how you're encouraging them to make more content -- but this only works if you're buying official merch to keep sales up to show that licensing is worth keeping that series on air/in print.
This is probably more obvious if you're living in Japan and can directly see the effects. Some Boyfriend game I was playing had an event where you can directly vote for your favorite Boyfriend and then only the top three will get candy produced. The software makers certainly aren't the ones manufacturing the candy, but you can directly see how if you support a particular character, pay money for extra votes for him, buy all of his candy (the entire candy line for all characters sold out completely on the day of release), then he'll have more appearances in the storyline, more cards, more stories you can read, more everything, because everything you buy directly shows he's worth making content for.