Why does Kotter return in Welcome Back Kotter?

I haven’t seen Welcome Back, Kotter in years, but the theme song popped into my head a few days ago. I know that his dreams were his ticket out of there but that they have turned him around, but do we know why Kotter returned to James Buchanan High School?

Gabe Kaplan was a remedial High School student in Brooklyn. He fashioned his sitcom on the concept of a student from his background, returning as a teacher to teach the next generation of remedial students.

So, to answer the question, Kotter was supposedly a founding member of the Sweathogs, and he was returning to the high school he graduated from to teach the next generation of Sweathogs, who he knew he could relate to and therefore unlock their potential.

“Who’da thought they’d meet ya
back there where they’d need ya?”

They needed a teacher who could get through to the kids. But, in reality, they expected to only get (at best) a babysitter to hold class until the sweathogs dropped out. Of course, since Kotter could relate to them, he was able to actually get them to learn.