On the other hand with HOA, having another entity to tell you what to do with your large purchase doesn't sit right with me. On paper they're not so bad. My experiences with them(three times) have been completely incident free, plus got access to a nice pool and garbage collection. But you'll read a lot of no doubt true horror stories that show how things can go awry.
I've personally had my city pick up tires from a green space (also recorded the company that dumped 'em), cut overgrown yards and sidewalks, and they consistently collect my trash.
Why would someone with a functional local government ever entertain the straightjacket that an HOA enforces on its residents? It's not their business what color I paint my house, where I put my basketball hoop, or what size and style hedge I grow around my front yard.
I remember calling the police about the rifle firing(this was not on acreage), and they acted like I was annoying them!
From what one developer in Florida told me, the local government doesn't want to pay for roads, services, or amenities for any new developments, so requires they set up an HOA to cover it. Seeing as over 80% of new build homes are in an HOA, I tend to believe that.
They don't generally do any of those but the first on private property, except maybe (for the cleanup tasks) after citing and fining the property owner for failing to do it in addition to charging them the cost of having it done, and they often do the first only under a contract with the property owner, so that with a shared structure with a common set of bins, the contract would need to be with an association responsible for the shared bins.
While cities may do the things you describe, its usually going to long after the problem emerged.
At least with HOAs, they will fine you and possibly take your house. For these extreme cases it's a great way to keep people in shape. I guess the problem is when they get abusive and try to do the above for yard weed, paint, or other benign violations.
Having served on an HOA board for years, I can mostly verify this. There isn't a lot of overlap between wise, community minded people and the people who strongly desire to be on a board.
The boards that have lost their way are dominated by people who really want to be there.
HOA's whose charters allow them to, and who actually do, act to regulate things like the aesthetics or worse specifically negating functional utility of non-shared parts of the property when there are no structural or safety impacts to the share infrastructure are awful.