The two times I've done this have both been to counter-act the Normal type Gym Leader.
In Gold, I was kinda scared of Whitney's Miltank's Rollout, so did an in-game trade for a Machop and pretty much wiped the floor with it. Afterwards, I deposited it right in the PC never to be used again. I didn't feel guilty then, and I still don't to this day.
In Black, I sorta just wanted a Fighting type, so caught me a Sawk and proceeded to level up the crap out of it, in order to fight Lenora and all her library drones. It also worked wonders. I think I kept Sawk for a little bit longer before getting rid of it for a Scraggy. (Ugh... worst decision ever!)