The existence of an exception validates the existence of the rule to which it is an exception.
I thought I knew the answer to this question, but upon further examination, it seems I was wrong. I had believed that the key to understanding this phrase was to look at the alternative definition of to prove – “to test the truth, validity, or genuineness of” per Miriam Webster. This would mean you could rephrase the saying as “the exception tests the rule” or “the exception challenges the validity of the rule”.
However, if we look back and the origin of the idiom, we can see that the meaning of prove is intended to mean what we originally thought. Which is to say “the exception demonstrates the validity or existence of the rule”. So why is that?
In Latin the original phrase was “Exceptio probat regulam in casibus non exceptis” which translates roughly to ‘exception confirms the rule in the cases not excepted’.
exception that proves the rule:
something that emphasizes the general truth of a statement by disagreeing with it:
[e.g.] Most company directors are middle-aged men, but this 28-year-old woman is an exception that proves the rule.