For years McDonalds and other fast foods in America bundled toys with Happy Meals. Building cheap little toys is way less expensive than big budget media.
Happymeal toys probably cost McDonalds nothing. I'm sure Nintendo was covering the cost of those Pokemon. It's advertisement.