My high school here in the United States also had a roof access, but it was just to maintain the air conditioner units and clean the rain gutters.
That place looks like a well-maintained observation deck.
Why keep a place in that kind of condition if only 3 unpopular people are going to eat there?
@sempersolus it doubles as a place where the kids can get sun exposure without leaving the building. There are benefits to that. (not saying it's the reasoning they have behind it, but it does help in that way).
@SemperSolus Basically just a manga and anime thing, isn't it? Even some other manga/anime say so sometimes, pointing out that the students aren't allowed on the roof because "this isn't a manga." As for why they might be designed like that if people aren't usually allowed up there, I'd say it's for special occasions in which there actually would be teachers up there too and not just a bunch of unattended kids who could be getting into trouble in various forms. Area like that could be useful to the astronomy club if there is one for instance? I dunno.
Japan is pretty advanced in a lot of thing, but the dire reality is, you apparently still cannot be openly gay/bi in schools despite the huge amounth of cultural references on it.
Surprisingly enough, trans people look more accepted still.