The local law supersedes the rules and regulations of the HOA, meaning that HOAs must ensure they are operating under the law.
Once you buy a home that's part of an HOA, you automatically become a member of the HOA. HOA rules are legally binding, and you must adhere to all rules and regulations in the governing document. Yes, there are bylaws that you may not like, but there are no HOA loopholes.
Finally, is an HOA considered a local government? No—HOAs are not considered a local government entity. While they do hold some administrative functions for a community, such as collecting assessments and enforcing rules, they do not possess the authority granted to real government bodies.
Federal Law Supersedes State Law. While a municipality can write local laws they can be stricter than the State law (as long as they do not run counter to the State or U.S. Constitution) But cannot contradict state law.