It served the purpose of doing what the gym leader asked them to do, the Kami Trio and the two episode plot being inserted into it, was promotion obviously and they released a lot of merchandising related to them along with the episodes but no, Satoshi and friends went there with a story objective asked by the Gym Leader.
No the anime is not promotion to "pokemon"(games I assume), the games came first, the anime came after, the anime, games, etc are many of the ways Nintendo/Gamefreak/Pokemon company, they use to for their series.
They might have special episode or plots to promote the games when they are almost coming out, like the Johto festival thing and the main storyline and the anime series are made to represent said generations but the anime isn't there, "just" to promote the games.
Oh and whats up with saying the animation sucks because we got some erros in an episode? the animation has been pretty nice, we weren't promised better animation what are you talking about? lol the animation changed but the animators are mostly still the same, its the same for YEARS, there are animators that usually do a great job and others who are messing up a lot of times, stuff happens.
This type of ongoing animes don't have amazing budgets btw since they have to put up a lot of episodes, an anime with 12/25 episodes usually has better art for that reason.
Your post makes no sense.