If you happen to follow doujinshi[fan-made comics] or such a video game, you would be sure of this. This is a primitive method for all the doujin fans to create doujin stuff. To get to the point, 学園[gakuen] means school and 化[ka] means to change sth in the certain way. Or else, it is to transform like something. 学園化[gakuenka] means to put all the characeters in the series into school setting. Can I say schoolnize? Anyway, why is this such a rule-of-thumb? No, this is not a doujin thing anymore because even the originals use it as a side story or something like that. Above is, yes, 3年Z組銀八先生[san’nen Z-gumi Ginpachi-sensei] which occasionally comes as an extra story in Gintama. In this story, Gintoki plays a role as a teacher, and other characters show as a student. Don’t care about their age! It’s a fantasy like yaoi.
Anyone experinces a school life. There are a lot of kind of teachers or classmates, and it is pretty easier to fix your favorite characters up with a “job.” You can arrange as you like. Who should be a teacher? What kind of subject should he teach? How does he act as a teacher? Rude or humble? DelusionImagination never ends, so that this makes it easier to make a story.
Even if the original story takes place in a fantasy world and the characters do a totally unreal thing, those characters naturally get close to our real life by using this method, 学園化. I assume such is a fundamental reason why this is so popular.
So, which anime do you want to schoolnize?