People will lie about their incomes on anonymous surveys. People lie in anonymous polls about their voting intent. You can boil this down to:
1. People lying to themselves and then reflecting that lie to others. A common one I see here is, for example, "it only takes me 30 minutes on the bus to get from SF to work". At 1am on a Tuesday with a tailwind maybe. It's a form of cognitive dissonance; and
2. People lying to others. This is for personal gain and because the person cares about how they're perceived by others.
So if you take an example from the post (eg working class family background) it could be either. I've known people who really believe they're working class heroes but they're clearly middle class. It can be woven into their identity. It can just be virtue signaling. It can be to fit in. It can be aspirational.
The 2000 election had Al Gore vilify the "top 1%". A survey at the time found that 19% of people thought they were the top 1% and another 20% thought they would be some day. So with this lie they've told themselves (knowingly or not) you've dended up alienating 39% of voters.
Ultimately though a lot of these lies can be reduced to people feeling good about themselves even if that means making other people look bad.
A lot of social media is built on such "flexing". Instagram in particular. Even Tiktok has all these videos where people post these "how am I so amazing?" videos. You just need to realize it's pretty much all lies.
Oh and as for this specific example from the post (ie fetishization of a working-class background in the UK) this is interesting because my experience in the UK was there's a lot of value in signaling your upper class background, how you went to Oxford, Cambridge or Eton, the BBC accent (now this is really the modern RP accent) and so on.
The UK is still quite classist (IME). Up until 20-30 years ago, university applications asked your father's occupation.