We're not saying Andersen was obsessed with social class… okay, yes, we are. Maybe it's because he was born poor and was always trying to claw his way to the top. Maybe it's because he worshiped the nobility while resenting them for holding him at arm's length. Maybe it's because, despite all that, he was dependent on the upper crust's patronage to create his art. Whatever the cause, Andersen's stories portray everyone from the Kim Kardashians of his day to the truly destitute. Some of the wealthy royals in Andersen's writing are noble of heart, so being rich doesn't automatically make a character bad. But other of his Richie Riches act like total schmucks. Andersen's sympathy for the lower class is obvious, as can be seen in "The Little Match Girl." And some of his lower-class characters manage to make it big, rather than just dying and going to heaven… which is way better than being poor in Andersen's world. Sorta like in our world? Ugh, let's turn that frown upside-down, everybody!
In Andersen's world, it is the duty of the nobility to look out for the lower-class folks.
Being pious is a better ticket to happiness than being rich.