First of all, I was responding to the poster's claim that a cop can enter any public space. You and I would agree that such a claim is absurd.
Second, the cop entered a locked space outside his jurisdiction while on duty and entered that space without the permission of the school board or the school administrators. As a cop, he was either aware he was abusing his powers or was unaware. Both are bad indicators of his suitability to wear the badge, as well as the fact that he was wasting taxpayer money while on duty in pursuit of his own political agenda.
Why is the room locked? To keep the public from seeing what is on display? No, the room should never be locked for that purpose - that is wrong. The teacher and students do not have any presumption of privacy from observation or exemption from accountability.
The room is locked to protect the personal property of the teacher and the students from being vandalized or stolen. Allowing a citizen who asks permission to see the display to do so, does not violate any principle of protecting personal property.
I do have a problem with seeking permission from a school board before being allowed to see what is taught in the classroom. That's taking government authoritarianism too far.