As the narrative describes Mr. Woodifield's habit of getting dressed up once a week and visiting his old office, it presents a simile that sheds light on how hard it can be to move on from happier times:
All the same, we cling to our last pleasures as the tree clings to its last leaves.
This simile appears after the story suggests that Woodifield's wife and daughters think he makes "a nuisance of himself to his friends" whenever he goes into the office. This is a somewhat humorous suggestion, as it invites readers to laugh at Woodifield for pestering people like the boss for seemingly no reason. This simile, however, suggests that Woodifield doesn't do this for no reason—in fact, he has a very good reason for hanging around the office. He clearly remembers his office life with fondness. There's also an implication that he isn't as happy as he was when he was still working, since the simile suggests that he doesn't want to give up his "last pleasures," indicating that chatting with old friends in the office is one the final remaining outlets of enjoyment in his life.
Furthermore, by comparing Woodifield's behavior to a tree "cling[ing] to its last leaves," the story suggests that Mr. Woodifield is in the final period of his life—a period in which, because he's aging, he's losing many of the things that once defined his life. Because so many of his youthful pastimes are falling away (like leaves falling from a tree), it makes perfect sense that he would "cling" to the few "pleasures" he still has.
After Mr. Woodifield unexpectedly mentions the boss's dead son, the narrative uses a simile that helps readers understand just how horrific and shocking it is for the boss to suddenly be reminded of his loss:
It was exactly as though the earth had opened and he had seen the boy lying there with Woodifield’s girls staring down at him.
Merely hearing that Woodifield's daughters stumbled across his son's grave is so unsettling to the boss that it makes him feel like he's staring at the young man's corpse, which would obviously be very frightening and alarming. This simile emphasizes the extent to which Woodifield's comment disturbs him, effectively highlighting that the boss has not yet fully processed the trauma of losing his son. Just hearing somebody else mention the young man is enough to make him feel like the "earth had opened"—a phrase that hints at the boss's efforts to bury the painful memory of his son's death.
And yet, it's obviously impossible to completely ignore what happened, which is why even a small passing comment is enough to viscerally shock the boss. Despite his efforts to not think about his loss, it takes very little for the boss to feel like he's suddenly face-to-face with his dead son. By comparing the effects of Woodifield's remark to the experience of staring straight down into the son's grave, this simile makes it clear that the immense and horrifying sorrow of losing a son isn't as easy to forget as the boss would like to think.
After Mr. Woodifield leaves the office, the boss feels stunned by the comment the old man made about his dead son. Meanwhile, life goes on in the office, and the story uses a simile to convey the profound shift in the boss's demeanor:
For a long moment the boss stayed, staring at nothing, while the grey-haired office messenger, watching him, dodged in and out of his cubby-hole like a dog that expects to be taken for a run.
This simile—which compares the office messenger to a dog—reinforces the boss's authority in the office, since the office messenger is so anxious and eager to obey or please him. It's clear that the messenger has picked up on the sudden change that has come over the boss and, much like a dog waiting for something from its owner, is anxious about what might happen next.
And yet, while the simile draws attention to the boss's power and authority in the office, the boss himself no longer feels quite so in control, since Woodifield's remark about his son has rendered him momentarily incapable of doing anything but sitting at his desk and wallowing in emotion. The simile thus emphasizes the boss's powerful professional position while also suggesting that this power does nothing to help him deal with his own turbulent emotions.