This scene is an allusion to a famous epic poem,
The Odyssey. When the Greek hero, Odysseus, finally returns to his home island of Ithaca after years of war, travel, and shipwreck, his dog, Argos, recognizes him. In that story, Argos perks up his ears and wags his tail. Now the tables are turned—a dog comes home after roaming—and the reader has the chance to observe what kind of welcome the house will offer.