The phrase is from Shakespeare's Hamlet:
Hamlet: Ay, marry, is't, But to my mind, though I am native here
And to the manner born, it is a custom More honor'd in the breach than
the observance,
Hamlet Act 1, scene 4, 7–16ℹ
E notes makes the following point
MORE HONORED IN THE BREACH Since, to Hamlet's mind, native customs
ought to bring honor on a people, it would be more honorable to forego
was-sail and "up-spring reels." These customs are, as he puts it,
"more honor'd in the breach than in the observance"—breaking tradition
is in this case more honorable than observing it.
His words have since
been twisted around. Today we mean something like "more often
disregarded than adhered to," perhaps taking "honor'd" to mean
"observed" (as one "honors" tradition or "honors" a contract). But
Hamlet's point is that the custom is observed too often, denigrating
its observers rather than conferring honor on them.
Thus, the way the expression is used today is different from the way that Shakespeare intended. A rule which is rarely observed is often said "to be more honoured in the breach than the observance".