Number 6 was a Magnemite that did not listen much to Ethan and wandered off. When Ash got it after going to next town to carry electricity, Number 6 helped him defeat Team Rocket, evolving into a Magneton in the process.
These Magnemite were used to provide power to nearby towns during blackouts. Fortunately, Ethan keeps them numbered in case of an emergency.
Ethan uses this Jolteon to round up his Magnemite, like a shepherd collie.