There appears to be several hundred windows in Robb Elementary. I'm sure they are not bullet proof. The shooter could have opted to shoot them out to enter the school. He could have shot out the window in the back door where he entered.
The school is spread out, he could have entered and killed several people before half the school would have been aware that children were being killed. If he was athletic there are numerous ways he could have climbed on the roof; climbing on top of several air conditioning units; fencing close to the building that would allow him to get up there.
The gym or auditorium appears to have clerestory windows which could have allowed him to kill numerous people. If he'd been there one hour earlier he could have lain on the roof and shot children and their parents during their graduation. He could have just walked around on the roof taking pot shots into the classrooms below. The ammunition he used would have made that easy. He could have picked them off one by one when they ran from the buildings.
He could have run back and forth from building to building using the covered walkway as a means of transport. He could have done a lot of things that no one can ever prepare for. I don't think this guy expected to survive the event so thinking a locked door would have stopped him is short sighted, imo.
If there was a film taken of this event from beginning to end, we could rewind it pointing out every short fall that occurred up to his death. There: the open door, there: no officer on site, there: no armed teachers: etc etc etc. But the problem is the beginning of the event wasn't filmed when this young man was able to buy two high powered rifles online and ammunition used by US military. The ammunition was introduced to cut costs as a lighter product producing less recoil as the 7.62 mm but being able to travel at supersonic speed and still be able to pierce a standard issue ballistic helmet at 500 yards. Think about that for a while. He was an 18 year old who was able to buy that product. He couldn't drink until he was 21 but he was able to buy bullets that would obliterate a child's body <modsnip>
Link to US Defense News YT video regarding 5.56 ammo.