Homeowners associations are legal entities formed by developers (Declarants). Local governments require that in fee-simple (non-condo) subdivisions that an HOA be formed to own and maintain common area within that new subdivision. This is so that the County doesn't end up bearing the burden or cost of maintenance of the common areas, private roads, etc. within a community if the owners cannot or will not take care of them. If there is no common area within a subdivision, i.e. all land is either within lots or public roads an HOA would not be required (but still may be desirable due to the benefits described below).
There are many benefits to living in a community with an HOA beyond common area maintenance. Some HOAs include individual yard maintenance and/or exterior home maintenance, most require architectural approval for exterior changes to the lots/houses and almost all have specific rules regarding appearance and use of the lots/houses that help protect the value of properties within the community. Below are two publications from the Community Associations Institute that provide more in-depth information about what it means to live in a community with an HOA.