The important lesson that Watson learns, and one of the themes of this story, is that Watson tends to overcomplicate things, while there is usually a much simpler answer.
The author reveals the theme right at the beginning of the excerpt, and then again through the rest of it. When Watson enters, he is amazed that Sherlock knew he was there because he had not announced his presence. He thinks it must be some part of Sherlock's amazing powers, but Sherlock reveals that he just has a shiny surface in front of him and could see Watson's reflection.
Next, Watson is so proud of himself, thinking that he has been able to get as much information from a piece of evidence as Sherlock could, but Sherlock shows that his assumptions are not necessarily true and that he might have tried to hard to create a truth (that the man was a traveling country doctor which had worn out his walking stick) based off of something that had a simple answer (the man had a dog who chewed on his walking stick).
The theme that things are often simpler than they appear is shown as Watson learns that he tends to overcomplicate the answers to many things.