It's all about creating an impression of yourself to the world. Most people don't want people to know they are struggling, or unhappy, or the house is a mess. Some people possibly also want to show off that their life is somehow "better" than other people, so post only the best bits.
I don't post any pictures on social media myself, nor do I let my wife post any pictures of me, or our daughter, except to places that only her family and friends can see, as it all just seeks so pointless to me, so I perhaps will always view it with a negative bias.
I know people that spend all week in a truck, sleeping in awful truck stops, showering in cold dribbles of a shower, having a pretty unenviable day to day. To look at their social media feeds though, it's all posh restaurants, big smiles, glasses of wine. They share the good, but not the bad they have to go through to achieve the good moments.
I've also known couples who were having troubles, or one couple where neither person was a particularly nice person, but social media feeds show them as all loved up, big gushing posts of eternal love etc.
Just assume you everything you see on social media, or in media in general tbf, is curated to make things look the way the poster wants them to look, and the truth is often different.