A big high school may have 5,000 students. Letting them in one at a time, scanning their bags, searching each one physically, etc., like a high-security airport line, would take all day. Even then - like with airports - weapons could be missed.
Doors have to allow emergency exit, or all the occupants die in a fire. (Can’t get your gun in? Set the place on fire and watch everyone burn/smother!) If you’ve got a door that opens, someone will prop it open while they go out for a cigarette, or will arrange to let someone in at a particular time.
Years ago at my place of work, - a building with armed security guards, an open search policy, card-operated security gates, cameras - a man came in and shot his estranged wife. (She was not seriously injured.) He got in by approaching the gate and telling an employee that he’d left his card in his car, he was going to be late for a meeting ... and the employee passed him in.
In summary, there is no physical security that cannot be EASILY circumvented by people who do not wish to comply.
To clarify.. one guarded entry point once school is in session i.e. after everyone is inside... figured that obvious.