In O Henry’s “The Gift of the Magi” the author shows that material possessions are not important in several ways.
First, he sets up the ironic nature of the story by showing the reader a treasured possession of each main character. For Della, it is her hair. The author demonstrates the beauty of Della’s hair by comparing it to an ancient royal figure:
Had the queen of Sheba lived in the flat across the airshaft, Della would have let her hair hang out the window some day to dry just to depreciate Her Majesty's jewels and gifts.
Jim, on the other hand, is proud of his watch. O Henry makes another comparison to ancient royalty, this time King Solomon:
Had King Solomon been the janitor, with all his treasures piled up in the basement, Jim would have pulled out his watch every time he passed, just to see him pluck at his beard from envy.
These historical allusions are all the more significant because there actually was a relationship between the Queen of Sheba and King Solomon, and they famously bestowed gifts of wealth upon each other.
After describing the events of the story, in which Della and Jim each sacrifice their possessions to buy Christmas gifts for each other, O Henry brings the irony to a climax as each character realizes that they have, in effect, sacrificed their own favorite possession to buy something useless for each other.
Now, O Henry communicates his theme by showing how the loss of these possessions does not upset either character. In fact, they handle the situation with grace and humor.
. . . Jim tumbled down on the couch and put his hands under the back of his head and smiled.
Then the author uses his narrative voice to finish communicating his theme. Here, O Henry states that the couple’s financial situation is not what is important:
Eight dollars a week or a million a year--what is the difference? A mathematician or a wit would give you the wrong answer.
Finally, in a reference to the wise men who gifted the baby Jesus, O Henry writes:
And here I have lamely related to you the uneventful chronicle of two foolish children in a flat who most unwisely sacrificed for each other the greatest treasures of their house.
The words “uneventful,” “foolish,” and “unwisely” are used here in the ironic sense. O Henry, as demonstrated by his story, believes these characters are, in their way, very wise.