Yes, whether they are structured as a private corporation or an unincorporated association (including non-profit ones) HOAs are legal. They are governed by state and federal law, and have to follow those laws if they expect to operate without being challenged by owners.
HOAs set their own rules through their board and file CC&Rs, but those cannot violate laws. Some constitutional challenges have been made with mixed success, and always at the cost of the owner. Fighting an HOA consumes time and often significant attorney’s fees. By far the best course of action for someone looking to effect change within an HOA is to run for the board or propose amendments to the CC&Rs to help meet the needs of your community.
Want to learn more about your HOA? Run a free Eli Report!