An HOA is essentially a contract. When you purchase the property that is within the HOA, you take it subject to the covenants that run with the property and thereby enter into the contract that the covenants constitute. An HOA has every bit of authority that any contract would and most covenants provide terms heavily in favor of the HOA.