To put this in simple terms. Lower the level of a given Pokemon, the higher the exp gain. You must have defeated a high leveled Pokemon, a Pokemon from Cynthia or from an athlete in one of the courts in Nimbassa, in order for this to happen.
Don't worry this is happens a lot when training weak(er) Pokemon. I know this from experience.