In many places, the HOA is the only entity that will do anything about bad neighbors like a dog that barks 24/7 or someone playing music all night—things that don't necessarily break city law but do affect your life, or things that do break city law but the city won't bother enforcing.
Those things should break city law though! To me, this is another of privatizing what should be the government's job, resulting in less accountability and less democratic control.
Why not have both? City law sets a baseline for the city, but that will be a one size fits all solution.
Someone who wants a place quieter than the noise level the city enforces can find a development with an HOA that sets a lower level. Someone who is particularly sensitive to smoke can find a development that bans outdoor fires on more days than the city does.
As long as an HOA is only limiting things that actually affect other people and maintaining common property, and it is legally structured in a way that prevents scope creep (or ensures that existing owners are grandfathered if new restrictions are imposed), I don't see anything inherently wrong with having an HOA.
I don’t know if HOAs are great or not, but I live in a mid-size city with a lot of more important problems than taking care of my neighbors’ unsightly home situations. I can’t realistically expect city government to handle it, and moreover different neighborhoods have different very comfort levels with that sort of thing. Moving that sort of “minor living arrangements” governance out of the big city government into the neighborhood actually works much better.
If the HOA is entirely elected by the people who live in it, it sounds as if it would be more democratic and more accountable than a town or city government. Your vote will have more power and the people elected will literally be your neighbors.
It all comes down to luck of the draw.