This is pretty much what psychologist Leon Festinger described as cognitive dissonance reduction. When two beliefs/opinions/observations (cognitions) contradict each other (are dissonant), people seek to reduce this dissonance.
There were experiments with two groups of men, both having to do dull, hard and repetitive activities. One group got paid very little for their work, the other group got paid more. And the group that got paid more was less satisfied, while the group that got paid less was more satisfied.
There was no contradiction between hard work and good pay, good pay seemed like the logical compensation for dull, hard and repetitive activities. But people who had to work hard and got paid like shit began to reduce that "dissonance" and told themselves that it's actually good work, that it's alright, that they should be happy about it and then later claimed to be more satisfied than the group who got paid more.
This explains both the "poor but happy" phenomenon as well as why the ruling class was so eager to destroy the field of psychology and turn it into a branch of big pharma. These days, psychology is only about prescriptions, about selling big pharma's drugs and drugging the symptoms away, rather than tackling the actual disease. Being aware of what social circumstances make you depressed would be dangerous for the ruling class - much better to be a sheep on drugs who believes that there are individual solutions to systemic problems.