The door was bolted on the inside and the window was fastened.
And yet a man came in and went out again. There was no place in the room to hide, and the chimney is too narrow for anyone to pass.
When Watson says he can make nothing of it, Holmes brings out the line he always brings out.