It's worth noting that NPC pokemon rarely have natures, EVs, IVs or items. Even if the levels are higher your pokemon are usually much stronger. XG also has the exp scaling from gen 5 so you get more experience if you're behind the level curve. Always expecting to be a higher level is another...