This is more of a linguistics answer to a linguistics question, but TL;DR it depends on how you frame the rules.
"Rules" in popular grammar are not good analytical tools. They tend to be generalizations, i.e. just one step above observation. When we say thing like "In English, an object pronoun comes after the verb, but in French, it comes before the verb," we're not adding any understanding of language as such; we're just summarizing our observations. A true analysis would describe some underlying mechanism that allows us to predict the placement of object pronouns, issuing statements that are possible to falsify. (For example, an analysis might predict speakers' interpretations of je me te donne and je te me donne, where the status of the pronouns is ambiguous on the surface, or it might provide a coherent explanation for vous me le montrez but montrez-le-moi.)
I say all that to explain that the "rules" we use to describe grammar are of arbitrary scope. Since all they do is summarize observation, it's up to us to decide how much of what we observe will be included in the summary.
The less we include, the simpler the rule, but everything we've excluded becomes an "exception". The more we include, the more complicated the rule, but we do away with "exceptions".
In the examples you cite, we could write a simple rule that goes: "The direct object comes first." In that case, we'd have to list as exceptions me, te, se, nous vous. Alternatively, we could write a simple rule that goes: "The indirect object comes first." Then our exceptions would be le, la, les. (In both cases, things like me te require extra exceptions.)
On the other hand, we could decide that we don't like inconsistencies and exceptions and instead formulate the rule: "Singular direct objects of fewer than three letters and plural direct objects of fewer than four letters come second; all others come first." This rule is convoluted and arbitrary, yes... but it has zero exceptions!
So the "inconsistency" depends on our point of view. However, the assumption (in generative linguistics, at least) is that there is some deeper rule we haven't detected that determines the order. Perhaps it's phonological? Semantic? Syntactic? Historical, i.e. a cause that has disappeared while the effect remains? But this belief in a consistent underlying mechanism is not universal, and one might argue that even that mechanism is somehow inconsistent or random.
Note that while rules of this kind are not analytical, it's true that some give rise to better analytical directions than others. For example, a common rule you might see is: "Indirect object first, unless they both start with L, in which case do it alphabetically." This rule is both simple enough to memorize and it works simply because it happens to sort lui and leur after le/la/les. But at the same time it's very unlikely that the underlying mechanism takes account of our written alphabet (after all, illiterate people still use pronouns correctly). It's the kind of accidental rule that's discovered by machine learning, correlation without causation, and hence not a good research direction.