Oh fuck it's just occurred to me that like
1) The Little Palace was designed by a very old, very paranoid Grisha who's spent his entire life being hunted and persecuted for existing
2) The Little Palace was built with at least one secret passageway Alina didn't know about, which brings her out into the grounds somewhere. There are most likely dozens of these hidden tunnels - they're escape routes for when the otkazat'sya inevitably turn on the Grisha and Kirigan finds himself with a school full of kids to evacuate.
3) In S2 at the Spinning Wheel, Nadia says that the First Army raided the Little Palace, and Nikolai is sheltering the survivors. There's a decent number of them, by the looks of it. More than a handful. Probably all those who were close enough to an exit passageway.
4) Kirigan wasn't there to open up the tunnels and lead everyone out, and neither was Baghra. So the tunnels can't be truly secret. Enough Grisha knew about them to vanish under the First Army's noses and escape. I'm picturing that one scene from Ye Olde X-Men 2: most of them got out through tunnels that weren't on any of our schematics.
5) This means it's likely that the Little Palace has its own version of those fucked-up shooter drills they have to do in America. The procedure for something like that would have to be drummed into these kids from as early as possible, just like they train you to respond to the fire bell, because otherwise in the rush and the noise and the confusion, they'd just panic, and that would cause chaos. They all need to know where their closest emergency exit is, how to open it, where it leads, how to check for nearby soldiers before emerging, where to go next. So that when they need that knowledge, it's become second nature. Instinct. Like young prey animals - just as Baghra taught him.
And this is the kind of fear and constant hypervigilance Kirigan and Baghra have been living with their entire lives, without even the benefit of a relatively secure, long-term home literally built to protect them. It's no wonder the pre-Little Palace Grisha are so messed up.
And he's probably had older Little Palace Grisha over the years, people like Fedyor, questioning whether it's really necessary to still be making these kids think they're at risk like that. The Grisha have been at peace with the crown for over a century! This is a relic from a crueller time, surely. And he brushes it off every time, because at some point in his history, he learned better. He's learned from his failures.
6) After Anastas put a bounty on his ambitious General's head and named him heretic, the guards say, "Thought you [and Luda] could quietly train witches under our noses, did you?"
So he's already helping teach other Grisha, even then, and we know from Luda that the king is now having said Grisha rounded up. And there's nothing he can do. If he goes back, the king will have his head. So when he next aligns himself with the crown as his own descendant, he's learned that unless he puts safeguards in place, it will be the Grisha he's protecting who will suffer whenever he butts heads with the monarchy.
And he turns out to be right. Pyotr and Vasily have neither the balls nor the strength to meet him on the battlefield, so instead they target whatever Grisha they can get hold of - the half-trained students, the researchers, servants like Genya - and blame them for whatever treason they're accusing him of this time. The escape routes were still necessary. They've always been necessary.
It just? Really hit home how fucked up this world is for them, like. Even within the 'safety' of the Little Palace, the Grisha kids would never truly be able to avoid or forget the fear and hatred the world at large has for their kind, or the danger being Grisha might place them in if their protector falls out of favour with the royals. Ravka might not experiment on them or burn them alive, but they're not safe. They never really were. They've only ever been used.
Convenient weapons, or convenient scapegoats, and with no say in any of it.