In "The Necklace", why is Mathilde is envious of the social class and wealth of others?
Mathilde is envious of the social class and wealth of others, namely those who are much better off than she is, because she has never really had a chance to experience neither class nor fortune, in the first place. Mathilde's case is quite unique. She has no background, no inheritance, nor family name. That she feels so entitled to be wealthy is one thing. However, she seems to be "missing" wealth and class as if she has ever had it.
Mathilde suffered ceaselessly, feeling herself born to enjoy all delicacies and all luxuries. She was distressed at the poverty o her dwelling, at the bareness of the walls, at the shabby chairs, the ugliness of the curtains.
Even Maupassant sarcastically describes the details that cross Mathilde's mind, showing in this manner the shallow nature of her thoughts, and the sad fact that she bestows so much importance on the superficial; on those things that are entirely unimportant. How is it possible that she is so given to those things that she has never known?
All those things, of which another woman of her rank would never even have been conscious, tortured her and made her angry.
The second answer to this question is that she may have vicariously experienced wealth through the character of Madame Forestier. We know that Mathilde feels "distress" when she visits "a friend from the convent" who has known Mathilde since a very young age, and who also happens to be very rich. Years after the convent, we find Mathilde being friends with "a rich friend", which we can only assume to be Forestier. This is who let Mathilde borrow the notorious necklace that the story is about.
Therefore, Mathilde's distress comes from having seen that other women who could very well have been her, get to enjoy the benefits that come from having a lot of money. Perhaps she is resentful, or even feels hurt that fate did not pick her to be like those whom she admires. Regardless, Mathilde has never experienced wealth nor class. Hence, she clearly has created a construct of what being rich supposedly is. Her fantasies carry her way too far. It is this proneness to fantasize and idealize life that led her to make choices that she will end up paying for dearly.