"I only intended to reprimand them for their poor conduct, but they've turned my apartment into their base"?
Well, what's the problem with that? You took these runaways off the streets and prevented them potentially going out and selling themselves to other men, so you've fulfilled you duty as a teacher (sort of)...And also you get paid 'rent' in sexual favours, so I don't see the problem. Tis a natural state of being for a Hentai Protagonist.
Still, despite him saying their lewdness having melted away his common sense (again, perfectly normal), he has the sense of mind to use condoms.
And of course, he continues to add to his harem at the end, even if it is unwittingly...
Ending could have been worse ... it could have been the landlord or manager of the apartment OR law enforcement who showed up at that hour. At that point, Sensei would have suddenly been up to his throat in Deep Doo-Doo (BRR)!
Get it?
It is because he is inside the students.