They ARE a level of government.
That is the whole point. For you to claim they have nothing to do with government is just plains delusional.
They are no more a government than a bowling league is a government....what do you want? Anarchy? Without some order, there CAN NOT BE LIBERTY.
You do NOT HAVE TO be under them - if you don’t like them, don’t live in a neighborhood with them. There are plenty of great places to live IN or NOT IN HOAs. You are only under an HOA if you choose to be so, thus it has nothing to do with government, which is NOT optional.