Normally with these meanings and origins the meaning is well-understood or self-evident and the interesting aspect is how, where and when the phrase originated. This one is a little different – it’s the meaning that is generally not understood.
To the untutored ear it might appear to mean ‘if there’s a rule and I can find a counter-example to it, then the rule must be true’. This is clearly nonsense; for example, if our rule were ‘all birds can fly’, the existence of a flightless bird like a penguin hardly proves that rule to be correct. In fact it proves just the opposite.
So, and here the maxim ‘a little learning is a dangerous thing’ comes into play, it has been suggested that it’s an alternative meaning of the word prove that is the source of the confusion. Prove can mean several things, including ‘to establish as true’ and ‘to put to trial or to test’. The second option is what is used in ‘proving ground’, ‘the proof of the pudding is in the eating’, etc. It could be argued then that the phrase means ‘it is the exception that tests whether the rule is true or not’. In our example the existence of a bird that can’t fly would put the ‘all birds can fly’ rule to the test (and find it wanting).
That’s all very well and most people would be happy to stop there. Unfortunately, when we go back to the legal origin of the phrase we see that it doesn’t mean that at all. It’s the word exception rather than prove that is causing the confusion here. By exception we usually mean ‘something unusual, not following a rule’. What it means here though is ‘the act of leaving out or ignoring’.
If we have a statement like ‘entry is free of charge on Sundays’, we can reasonably assume that, as a general rule, entry is charged for. So, from that statement, here’s our rule:
You usually have to pay to get in.
The exception on Sunday is demonstrating that the rule exists. It isn’t testing whether the incorrect rule ‘you have to pay’ is true or not, and it certainly isn’t proving that incorrect rule to be true.