Maupassant wanted to use this story to illustrate how a person should be happy with what they have and to show us that we should not allow pride to get in the way of doing what is right. Mathilde saw her life as meager and poor because she was comparing it to the lives of the extremely wealthy. She had a maid, but she wanted more than one and she wanted handsome men to wait on her as well. She had a nice apartment, but she wanted something palatial and covered in expensive tapestries. She has to learn her lessons the hard way when she mistakes the diamond necklace loaned to her for a real one. She loses it and rather than swallow her pride and admit that she lost it, she replaces the fake with a real and goes into severe debt for 10 years. During those ten years her life changes to that of someone who really lives in poverty. Her previous life looks like one of luxury, but she had to lose everything to appreciate what she had in the first place. She finally learns to swallow her pride and tell Mme. Forestier what happened to the necklace so many years ago only to learn that she suffered all these years and it was a fake.
The author was to show the difference between something real and false, and how our behavior can be affected by our misperception between the two, just as the protagonist's whole life is changed by mistaking false jewels for real. He also wanted to criticize vanity, especially the kind associated with wealth and materialism. To go beyond your means to look pretty, to be excessively concerned about how others perceive you—a perception based on expensive jewelry (in this story) or (in real life) designer jeans or Prada boots, diminishes your own sense of worth, which should be built on character, not what you wear or how you look.