Yep. Someone failed to lock the door. Either the janitor, or the resource officer, or whomever’s job it was, assuming that locking the door was standard policy and someone had that responsibility during school hours.
There’s a report that a teacher propped it open one minute before shooter entered it. Nypost.com