"Teaching" is one of the odd behaviors villagers might do when they are not working, like exercising, relaxing, chatting, and telling a joke. I think I've seen kids "go to school" on their own as well.
But, as Warren said, this has no effect on the villagers' skills. Kids don't advance their skills and adults do it only through working, except through special events.
-- jen