>>28589457Because they are either being trained by a much more competent person than Ash, or under Professor Oak's watch. As much as the anime shows Oak being some bumbling old man who gets beat up by Pokemon all the time, he is THE Pokemon professor and probably has all sorts of regiments and training schedules to get Pokemon in top condition while also studying them.
Ash never trains his Pokemon, he may run them through the occasional drills to be ready to fight a gym leader, but he never just grinds them against wild Pokemon, it seems the only times they ever leave their balls is for battles, to stop Team Rocket, to eat, or to show off.