Well, I personally think that you are told to train your Pokemon to fill the pokedex, just kidding, the proffesors tell you to go out and fill the Pokedex because they want you to fulfil their dream they never got to accomplish. If it isn't that I think you fill up the Pokedex for the proffesor while defeating the gym leaders and E-4 just to embarrass them by losing to a kid. I think that after you defeat them they pay you to not say anything about beating them and they just stay there. Well that's what I think.