New housing comes with an HOA that is operated by the builder. Once all units have sold, the HOA transfers to the owners. Someone has to maintain the common areas and the HOA already exists, so it’s easy to just keep it.
Edit: The builder creates the HOA so they can maintain a uniform look for the neighborhood. Those rules tend to stay in place since the since the people buying into the neighborhood were fine with that look and leaving things alone is much easier than changing them.
In the case of condos or anything else with shared walls / roofs, you need someone to handle insurance and maintenance. HOAs fill that need.
Latest Answers