Close to time to go home. He may have been posted up for that event. Everyone leaving but the alarm was an opportunity. Maybe some idiot student dropped the alarm as a haha. All speculation.
Very plausible. While the suspect was originally waiting for classes to dismiss for the exiting students another student (totally unrelated) pulls an alarm as a prank. The suspect may have panicked thinking his plan had been discovered. And he may have felt that he was too far into it to back out.