HOAs are a creature of state law and only have power to the extent state law confers it. They are not voluntary associations of the sort contemplated by the First Amendment. You can't choose to join an HOA unless you own land that belongs to it, and you can't choose not to be a member when you acquire a property.