State and local governments have given HOAs have far too much power.
It has been obvious for a long time, at least to anyone paying attention, that state and local governments have granted FAR too much power to Homeowner Associatons. That being the case, anyone at this point in time who purchases property in a development with an HOA deserves everything they get.
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.