It is obvious that the link of chain that Marvel breaks to get through the gate is not made of actual metal at all.
The administrators of the school are obviously comfortable that the chain on the gate is enough to keep out intruders. Later, the kids and even Captain Marvel get into the classroom without having to break down any doors.