In many locations neither of those items are purview of the HOA, those would be City ordinances and City Services.
HOA's in my experience fit 2 molds, with some over lap
The first takes care of common property of the community, like playgrounds, community centers, etc.
Then you have rules enforcement, which are beyond the standard city rules like length of grass, in the realm of the type and style of grass you can have, the plants you can have, the color of the home, the type of (or if you can) have a pool, or structure, or Playground, etc etc etc.
These HOA expanded on what would be normal governmental regulations around safety, and go into the realm of "property value" protection, and other ascetics needs of the community
Pools and structures like decks or sheds are regulated by the building code of the town, but they do not impact your property value for property taxes. Pools specifically also don't seem to impact property value when you sell, a pool is only useful here for 3 months of the year and lots of people don't want to deal with maintaining them. I would happily pay an HOA to take care of a nice neighborhood pool instead of maintaining my own but I've never seen a local single-family home neighborhood with a community pool here.
All the FL/TX ones even come with gates.
1) The conspiracy theory is that intentionally pointless HOAs were pushed by small government folks as a way to make people skeptical of tax-for-service organizations.
2) The HOAs point isn’t to regulate the 99% of people who would otherwise maintain their house. It’s for the 1% of people that wouldn’t and in order to avoid housing discrimination charges, you have to regulate everyone equally.
This is representative of the core conflict of American politics that makes it so confusing to outsiders - ideologically, the people in power (often delusionally) identify with Europe, but in practice, they desire power dynamics similar to oligopolies seen in the developing world.
Not to go too far with the metaphor, but if America never established race-based slavery (and instead, racial minorities were primarily the small number of remaining Native Americans), I bet we'd have a similar political system to Australia (where overtly exclusionary practices are more frowned upon).
In some ways it's nice to not have an HOA, no one bugs me if my lawn is looking sad. But in other ways it would be nice to have a unified group to take care of some neighborhood things, like unifying garbage pickup since we have private garbage companies here: there's probably 6 different companies who service my neighborhood on all 5 days of the week, it would be nice if we all just had 1 and probably we could all save some money this way too.