To start, there's a theory I've heard other people talk about before that suggests that humans are in fact Pokemon. Basically, it says that in the real world, you have all these living creatures that are categorized as animals, plants, fungi, etc., and that humans fall into the animal category. If you consider Pokemon the animals, plants, etc. of their world, then following this logic, humans would technically be Pokemon as well. This can explain why some humans in the Poke-world seem to have superpowers, like the many Psychics seen throughout the games. Those are residual powers from when humans were originally Pokemon.
My theory is that human's abilities aren't limited to residual telekinesis, but rather they have a unique ability, one that no other Pokemon has; the ability to amplify power through bonds. In other words, by being caught and bonding with trainers, a Pokemon can reach levels of strength previously unavailable to it. If this sounds familiar, you probably played Pokemon Conquest, which uses an idea similar to this to explain the Warrior/Pokemon relationship. But I believe this theory can work in the main series as well.
Let's take a look at two Rattata. Both are wild, but they're different levels, let's say, 5 and 10. Which gives more experience after being defeated? The level 10 one, right? But why? Mostly likely because it's a higher level. In other words, it's stronger. Now let's imagine these Rattata are the same level. The only difference between them now is that one is wild, while the other is partnered with a trainer. Which gives more experience? If you've played Pokemon, you know it's the trainer-owned one. Why? Well, following our prior logic, it's that it's stronger, solely because it's owned by a trainer. So Youngster Joey's Rattata isn't top-percentage because it's naturally gifted, but because of the bond the two share.
Not only can you use this theory to explain why trainer Pokemon give more experience than wild Pokemon, but you could also use it to explain why gym badges allow you to control stronger Pokemon, how Return works, why max friendship is needed to learn the elemental Hyper Beams/Draco Meteor, why friendship is required to evolve certain Pokemon, how a ten-year-old can catch a (supposed) god, why wild Pokemon can't Mega-evolve, and how Ash's Pikachu is so freaking strong. However, I'm going to stop here, because I'd like to keep this text wall on the shorter side, and it's three in the morning oh god.