For the purposes you are discussing, contract law would be applied to the situation, even if the HOA governing documents are not always contracts in a conventional sense, and are subject to rather elaborate statutory regulation (see, e.g., the Colorado Common Interest Ownership Act).
If the HOA violates the terms of the governing documents and as a result imposes the wrong dues amount or fine amount, a person affected by the mistake can go to court to contest that after exhausting any "in house" procedural remedies set forth in the HOA's governing documents.
Maybe the better question, is when would it not be a contract wherein
the owner would be unable to seek remedy in court / mediation?
The premise of this question is false. There are all manner of theories other than breach of contract upon which an owner would be entitled to a remedy.
For example, one could have a cause of action under a statute or governing document providing that the HOA must do certain things to collect an assessment.
For example, Colorado's statute governing HOAs states at Colorado Revised Statutes Section 38-33.3-114(2) that:
Any right or obligation declared by this article is enforceable by
Even in states that don't have such an explicit statutory declaration, the same conclusion is usually reached as a matter of case law.
Colorado's HOA statute, in another provision that it expressly states but that many other states would merely imply as a matter of case law, further provides that:
The principles of law and equity, including, but not limited to, the
law of corporations and unincorporated associations, the law of real
property, and the law relative to capacity to contract, principal and
agent, eminent domain, estoppel, fraud, misrepresentation, duress,
coercion, mistake, receivership, substantial performance, or other
validating or invalidating cause supplement the provisions of this
article, except to the extent inconsistent with this article.
Section 38-33.3-108, Colorado Revised Statutes.
So, while a collection of an assessment isn't strictly speaking a contractual matter (it is perhaps closer to corporate law litigation between shareholders and a corporation), the nature of the HOA's obligations are established by privately adopted written instruments whose terms have the force of law just as they would in the case of a written contract, when the people seeking to enforce it have a contactual chain of privity with the people who originally adopted the written instrument. And, the obligations created by that written instrument are judicially enforceable.
Ordinarily, the owner has a judicially enforceable right in any case where the right economically affects the owner's relationship with the association, and since this arises from a written instrument not enacted by the legislature that determines the parties rights, it "feels" and works in practice, very much like a breach of contract lawsuit.
In contrast, ordinarily an owner would not have a right to sue, for example, a landscaping company that did business with the association and overcharged the association for its services, thereby indirectly causing an economic burden to everyone in the association in proportion to their share of the association's budget. This contract, which is not directly between the association and the owner would normally not be one that the owner had "standing" to enforce outside of what is known as a derivative action, where an owner asks the association to enforce its own legal rights and it declines to do so without a good faith justification for doing so.
One can imagine an HOA where the declaration has a provision that provides for the adoption of a budget and provides a particular "in house" process by which that budget may be contested not long after the budget is adopted, after which it becomes incontestable (triple net leases often have similar procedures), and in that case, the process would have to be challenged then and could not be challenged when an assessment is invoiced to an owner. But, in the absence of such a process, a contest to an assessment would be a legitimate place to raise the question of an improperly determined assessment.