Thinking about rationalization of the implied setting of D&D, not in the way of industrial magic or anything like that (though I've done that before) but in the direction of how the implied setting of D&D might point toward its religions or belief systems. Sure, there's the explicit fantasy polytheism, but as others have pointed out, it's undermined by the (at least up through AD&D) presentation of the cleric class as vaguely sort of Medieval Christian and by the fact that historical polytheism didn't work like D&D thinks it does. As Delta puts it:
...D&D claims to have a polytheistic religion, but you've got both the politics and the critical Cleric class set up as in the medieval Christian world, and nowhere else.
Is there a more interesting and perhaps more realistic way weave together the elements presented? I think so.
Note that Clerics of 7th level and greater are either "Law" or "Chaos", and there is a sharp distinction between them.
- Gygax & Arneson, Men & Magic
OD&D mentions Law and Chaos with regard to a cleric's orientation. To me, this suggests a system of belief with a dualist cosmology. (Perhaps this is the actual state of the cosmos, but it doesn't have to be!) This is a moral dualism, as the two opposing forces or principles are in conflict. This could be interpreted (and perhaps is by some sects or particular faiths) as ditheistic with two gods or groups of gods in opposition, but I also think the broader, philosophical tradition could embrace transtheism, where the existence of Law and Chaos is a greater and more important truth than the existence or nonexistence of god-like beings/powers.
The church of law is syncretic, incorporating deities as it grows as agents, exemplars, or aspects of Law. No doubt there would be historic disagreement (possibly even conflict) over just how much deference and attention these powers are rightly due.
Clerics/priests, given the hierarchical structure presented in OD&D, are important in public rituals and ceremonies of the belief system but are also likely interpreters and scholarly experts on Law. Each of these Patriarchs (and Matriarchs, probably, though OD&D doesn't mention them!) is independent and self-governing but in fellowship with the others (generally). Initially a Patriarch would be a charismatic leader who attracts followers, but presumably the church they founded would have a mechanism of choosing a successor.
Patriarchs are the final arbiters of the commandments of Law within their area, but the Patriarchs of the various churches might vote to decide points between them, or perhaps different interpretations would reign in different jurisdictions. Another aspect of the high clerical function extremely relevant to adventuring is calling for and supporting crusades/jihad against Chaos.
Speaking of Chaos, it does seem a bit odd it is presented with a hierarchical clerical structure identical to Law's. One possibility is the "anti-clerics" are sort of Satanists and just performatively mock the church of Law, but another possibility is that "Chaos" only speaks to its ultimate goals or cosmological beliefs, not to its organizing principles. It's also possible (even likely) that the Church of Law applies the name Chaos to a diverse group of belief systems that don't agree with it and often don't agree with each other.