(1) Leaving abruptly would simply have provided a different propaganda line for the media: “Pres. Bush rattled before classroom of children, Pres. Bush rushes out of classroom etc.”
(2) Nothing in that first 7-8 minutes would further his “duties as Commander-in-Chief” — a man in his position knew it would take more time than that to gather initial facts.
What we were seeing here was probably the first time ever a POTUS was informed “live” of an initial attack upon the USA with media present (there was no reporting on the first 7-8 minutes or even hours of when FDR learned of Pearl Harbor).
Nothing Bush could do in those first 7-8 min. would have made any difference at all to what was already happening on 9/11, so the only useful “duties” he could perform at that moment was to carry on, think about what might await him outside of that room, and to await a more detailed briefing which was to come.
Put it another way: if he had been anywhere in private at that moment, informed by an aide in total secrecy, there was still nothing more consequential he could have been doing in those first 7-8 minutes.
(2) Keep in mind that Bush was informed of the first WTC crash before he went into the classroom. He was told of the second crash before the kids. I hope that Bush's first thought would have been a recognition that the US had suffered a coordinated terrorist attack.
(3) Here's what I would have done in the next six or seven minutes: talk to the Joint Chiefs; talk to Cheney, Rumsfeld, and Powell; order the US military to full alert and assistance to New York; ask for suggestions as to additional measures to take; order a return to Washington; and so on. Of course, Bush eventually did all those things and more -- but, having left the kiddies, I would have done them sooner than Bush did.