Definitely attention seeking, loneliness, or insecurity, and it's very likely that their life has not turned out how they want - so they fantasise and pretend to random strangers they are very successful professionals with lots of wealth etc etc... ...
Some pretend they know famous people, or a famous Prince, etc, and a close family member works for someone famous etc etc. All kinds of crap. The very highly educated, very highly paid, living in million pound home claims are very likely mostly fake, and all lies.
The ones who have made threads up about losing a baby or a child, or having terminal cancer, and other devastating life changing things, and they're just trolling baffle me. There is something very wrong with them and they need help.
Then there are the ones who make up shit about their neighbour attacking them for not watching the Queen's funeral, and make up random parking, neighbour, work, relationship, and friendship issues that don't exist.
They usually drop themselves in it when they start posting inconsistencies, and people call them out. Then MN delete the thread, and say 'troll.'
But yeah I do think it's largely boredom, and loneliness, and feeling like a huge failure in their life, so they invent scenarios in which they have a wonderful, starstruck life with wonderful lovers, great beauty, a fabulous career, and great riches. Oh also, if they are not married, they always have multiple FWBs, they always travel extensively, and they are always upper middle class.
Much of this ^(possibly all,) is bullshit. A fantasy life created by a bored and lonely person who hasn't achieved much in life.