The locked door of Hector’s classroom sets it apart from the rest of the educational system. When Hector is teaching, he locks his door against Irwin, and even against the Headmaster. The locked door symbolizes the invisible pact that Hector forms with his students, agreeing that they will try to resist the forces of conformity together. This comes with its own dangers—most notably, Hector’s secret molestation of his students—yet the locked door also creates a separate space for knowledge and self-actualization that doesn’t exist in the rest of the school.
The timeline below shows where the symbol The Locked Door appears in The History Boys. The colored dots and icons indicate which themes are associated with that appearance.
...the Headmaster calls Hector into his office. There, he asks Hector why he teaches “behind locked door s,” and Hector says it’s because he doesn’t want to be disturbed. “Teaching?” the Headmaster... (full context)