How can the professor determine which student cheated (or if both students cheated), without spending substantially time looking into it and talking to both students?
I had a professor who would actually give the person who did the work the worse grade, under the justification that you can never get rid of demand, but you could discourage supply. I thought it was a pretty clever solution. If I'd worked my ass off and somebody copying me got a 50% where I got a 0%, I'd be much more careful about what I shared.
You might believe that it's morally wrong to penalize the person who did the work, but I would have to disagree with you. Both Cheating and giving others the ability to cheat undermine the credibility of an institution and harm the legitimate efforts of others.
Then again, they'll do that anyway.
You miss a test, you get a zero. You go to the office of the dean with a note or explanation, get them to sign off that you should be allowed to retake, reweight, or whatever else it is that is needed, and then you go to the professor to deal with it.
The same sort of process should probably be put in place for plagarism. The professor flags you, and if you want to appeal, you go to the dean's office, they review the possibly-plagarized paper, and if they feel that the professor was in error, or that the student deserves the benefit of the doubt, they allow some sort of corrective action.