An exam is a very specific and defined event based in an implied social contract between instructor and students. That instructor's obligations in this contract are: to set and indicate the date of the exam from the start of the term; to remind of the date of the exam; to create and distribute at the appointed time a fair, appropriate exam that is a valid tool for assessing course knowledge; to proctor the exam appropriately; to grade all exams fairly; to hand back the exams; to go over the exams; and to field any follow-up questions or correct grading mistakes.
The exam-takers' only obligations are to take the exam under exam conditions, which are a specific set of behaviors that are quite different from everyday social behaviors. These are designed to ensure that every exam taker has a fair opportunity to do as well as any other exam taker.
Now, let's say you were an instructor and, prior to an exam, four students came up to you and said, "We are going to refuse to take this exam under exam conditions. We are going to be talking loudly, and playing music, using our cell phones, as well as shouting out answers occasionally, some of which will be wrong." Would you allow these four students to take the exam? No, it would invalidate the entire exam, for all students. They would be breaking the implied social contract.
In the same way, a student providing answers to other students is breaking exam conditions. If one student were to announce, prior to the exam, that he was planning on sharing answers with three other students, would you allow him to take the exam? No, again, it would be completely invalidating the fairness of the exam, in that the 25 students who weren't whispered to were at a great disadvantage compared to the few who were.
So you can't let this person take the exam, at least in the normal way--agreed?
So, how can you then evaluate this "protesting" student? You could go out of your way to provide another exam that you proctor yourself, but are you sure that is as fair as the original exam conditions would have been? And, further, why should you have to do that?. The process of "examining" students fairly and well is challenging enough--why should an instructor have to spend appreciably extra energy to accommodate students who refuse to adhere to the social contract? And if the instructor chooses to expend his/her limited supply of academic energy, is that fair to the other students, who are adhering to the social contract? The reasonable position is to make no accommodation, and to disallow taking that exam at all.
Now, what you're asking about is this same situation, except the student doesn't announce ahead of time that he is planning to invalidate the whole class's exam. He just does it secretly--but is caught.
Do you really think the instructor should respond, "Agh, had you told me you were going to do this I would not have let you take the exam, but gosh, now that you have, I guess I have no choice but to allow it as a valid exam."?
No, instead, the social contract and the consequences are defined well ahead of time, for all students. If a student breaks the social contract, their exam is invalidated, just as if they had never taken it.