It's usually the governing documents of an HOA that grant it too much power, and for the vast majority of issues that come up in an HOA the governing documents will supersede state and local laws. Aside from anything that would be illegal under state/local law, a set of HOA documents would be subject to provisions of contract law, which means you accepted the terms of these documents the moment you signed the title to your property.
Doesn't sound right to me. We had a bunch of issues that homeowners were able to overturn because state law overrode the HOA. (Maryland)