Basically, what
>>37787943 said.
The games at the time were trying to take the "grow up with your audience" route. Hilda/Hilbert were originally pitched at 16 years old, but later settled as 14. Rosa/Nate were 14 too, and then continuing the trend, Calem/Serena were 16.
The anime however was stuck in the perpetual "don't age, market to new fans" mentality, meaning they had to find another kid character to stick with Ash. Iris is quite literally the only non-teenage girl in all of Black and White, so do you really think it's a coincidence that they went with her?
It's tragic, because had Roxie not been introduced in B2/W2, they likely would have went with her instead, and it could have been better fitting for both Roxie and Iris's characters. Cilan probably would have been a different character too, and I'd rather have rock outbursts and puns than food-based ones.
Anyways, this proved to be a wholly unpopular move, and X/Y wanted a deeper backstory for their female protagonist this time around, being someone Ash's age from his past, which means they couldn't just take an established NPC from the games this time. Plus I don't think there was any female kid Gym Leaders in Kalos anyways. So they had no choice but to age-down Serena and use her instead.
Interesting to see what's going to happen with Gen 8. History seems to be repeating itself, with Gen 7 returning to primarily child characters, and Gen 8 seemingly "growing up with the audience" again, using teenage characters. Will the anime adapt this time?