Why do people like complaining?

Some people have incorrect beliefs.

Some people take things out of context, provide a hot take that is common sense, and implicitly declare themselves wise.

Straw man arguments.

Some people like to be persecuted, they feel they are fighting for something larger than themselves.

Some people like to complain about certain people with other people, they feel cameraderie, like they are seen and on the same team.

Some people do not realize that those other people do not really exist.

Or exist in a minority.

Or at least not enough to make their conclusions or decisions to action correct.