I thought it was more along the lines of prove = test; the exceptions clarify the rule. Or in AI training terms, you need negative test cases as well as positive test cases to adequately define a rule.
Thou shalt not kill, except all the times thou shalt.
Words being what they are, and us not speaking the language that created this saying, I'm guessing both general ideas can be true. :D
My memory is this came from Cicero and was about a place excluding women by rule, as they pointed to the exception of a woman that was allowed.
https://en.wikipedia.org/wiki/Exception_that_proves_the_rule seems to support both interpretations, and at least shows I got the speaker right. Not seeing that my specifics are good, though. I would not be shocked to know that I am wrong there.
This is, as I recall, literally the origin of the term?