People interested in teaching might do a fellowship, but a lot of others do too. For some specialties a fellowship is a de facto prerequisite to getting a job. Want to do pain management? Do an anesthesiology, neuro, psych, or physiatry residency first, then do a year of pain med and then go practice. Want to do child psych? That'll be a psych residency first, then two year fellowship. It's post-residency training for highly specialized jobs, teaching has little to do with it except that fellowships are often at university centers where everyone teaches those below them.