They're not popping up anywhere. They're only ever installed in a brand-new development. (Okay, I'm sure somewhere at least one, probably very small, neighborhood has voluntarily formed one for some specific reason, but in general.)

They are in all new developments in most states because the suburb model is financially unsustainable (see https://www.youtube.com/watch?v=7IsMeKl-Sv0 for the argument why), so, if you want to build a nice new development, the town/city is going to say "Who's gonna maintain that little park? Who's gonna cut the grass in the green spaces? Who's gonna sweep the streets?" etc. Not to mention, every amenity outside individual homes (clubhouse, pool, playground) etc. needs to be maintained. Cities can't afford to take them on as public parks, and the individual neighborhoods whose home prices paid for their construction don't really want them to be public either.

And the developer needs to have an entity with which all these responsibilities will vest when they're done building, so, HOA needs to exist.

The alternative is either no shared amenities of any kind, or trying to get the whole city to approve paying for the perpetual maintenance of a new public park when building a new housing tract. Good luck getting that passed, since most existing residents (besides the ones in the next tract over) would say "F that, I'd never go there, why should my taxes pay for it?"

Cities definitely can afford to maintain all that stuff.