After raising the Magikarp to their highest level (which correlates to player ranking), the Magikarp is then pitted against other trainers in the League Battles.
The Magikarp is then pitted against other trainers in the League Battles. The Magikarp was raising the Magikarp to their highest level.