Spoilers ahoy - what the hell, it was published in 1893!
So it’s late, and Percy Phelps’s brother-in-law-to-be Joseph walks through the unattended side door at the Foreign Office and goes straight to Phelps’s office, where he grabs the Naval Treaty, and then he retraces his steps back outside. Would security really have been that lax back then, especially after hours, or was ACD taking a little dramatic license? I have a hard time believing the side door wouldn’t have been locked, or that there wouldn’t have been a guard or commissionaire there. But no one in the story seemed to think it unusual at all.
Normally, the important papers were kept under lock and key, except when someone was actually using them. The lapse in this case was that the fellow had the papers out to copy and did not lock them away when he stepped out of the room.
I don’t find this unbelievable. An intruder could lurk in those offices many a day and not come across anything of value or find such a fortunate series of coincidences (sleeping commissionaire, papers out of safe, no-one in the room). This was above all a crime of opportunity, based on an otherwise unlikely set of conditions.
Except for a spy looking for government secrets. But in this case the thief was a person who was expected as a visitor, and who stole the treaty on the spur of the moment, not a person who had come expecting to try and steal something.
Normally, there would be no government secrets on display to steal. It was only because the fellow he was visiting was working late that the treaty was sitting out on the table - in usual circumstances, the treaty would be locked in a safe and the door to the office would itself be locked.
If the fellow hadn’t been working late, there would be nothing to steal. If he hadn’t stepped out for coffee (because the consierge was asleep), he’d have been there himself to ensure no stealing happened.