I believe that you're referring to Nora Helmer in A Doll's House. What the incident with the porter shows is that Nora is still somewhat naive in the ways of the world. She doesn't fully understand the value of money and what it entails. Nora has been kept in a state of infantilized ignorance for so long, first by her father, then her husband, that her attitude toward money is that of a child. Although Torvald hasn't taken up his new job, his impending promotion is enough to encourage Nora to start spending his raise before he's actually received it. To Nora, money is a means to an end, a way of making people happy. That's why she over-tips the porter. It's also why she carries out serious financial fraud to pay for Torvald to have some much-needed rest and recuperation.