I’ve heard a lot of horror stories about HOAs and I’m certain there are a statistically significant number of bad eggs.
However, that’s definitely not all of them, and in fairness to the HOAs that actually do shit (like mine): maintaining communal property costs money, running communal utilities like heating and cooling costs money, paying groundskeepers costs money, insurance and lawyers and regulatory compliance costs money, etc.
If someone isn’t paying those fees, everyone else’s costs go up and that isn’t fair to the rest of the community. It’s usually a lot of (expensive) legal work to confiscate a domicile, so it’s not the first solution a collection of middle-class homeowners reaches for.