The role of the supporting female character of Ash in Pokémon is quite frequently changed compared to that of his friend Brock. Is there a specific reason for doing so? I am super curious about this and would like to get an answer on the same. Although I have no issues with that, because I love Misty, May (and Max) and Dawn, all of them. Not to forget their Pokémon's too.
Ash's travelling companions are (somewhat simplified, counting only long chunks where they were all together):
Misty and Brock (78 episodes)
Misty and Tracey (32 episodes)
Misty and Brock (157 episodes)
Brock, May and Max (188 episodes)
Brock and Dawn (188 episodes)
Iris and Cilan (135 episodes)
Clemont, Bonnie and Serena (133 episodes)
146 episodes (give or take) with classmates (Lana, Kiawe, Lillie, Sophocles and Mallow) instead of travelling companions
Goh (currently ongoing)
Thus, I think the question would be better restated as "Why is Brock a constant companion for the anime episodes based on the first four generations of Pokémon games, whilst the female companion is changed for generations three and four?"
The reason, as stated in an interview held with Masamitsu Hidaka (director and storyboard artist for the anime) here: https://www.pokebeach.com/2008/07/second-pokemon-interview-with-masamitsu-hidaka-many-interesting-points is as follows:
So then I said, “Why can’t you just ditch Brock, have Ash, have Misty, and then bring in a new boy? That would be switching up things instead of having a new girl.” His following answers made me laugh my head off I had to pick it up off the floor and reattach it. He stated that they like to switch up the girls because it gives the boys some new eye candy every once in a while. He also said girls are more customizable and you can change their outfits, like when they are in their bathing suits (yes, he specifically said that). He also said Ken Sugimori designs a new girl with each generation and that gives them another excuse to switch the girl, though I reminded him that there is also a new boy with each generation too, and it wouldn’t hurt to use them.
So yes, the official reason that Misty was switched to May and then Dawn whereas Brock remained constant was to give viewers new eye candy, and because it was easier for them to customise the girls and show a variety of outfits. (This trend continues in the games to this day, with female player characters generally getting more customisation options than male).