@Maddus Mattus: Yes, but unless the teachers watch every student individually to make sure they came up with the answer themselves (which can't happen, schools don't have the manpower for that), you don't know if they came up with the answer or just wrote down someone else's way to derive the answer.

Take programming assignments, for example. All the people who grade the assignment see is the final program. They don't get to see you working on it (sometimes they do because the people who grade often also help out during lab hours, but they won't observe necessarily every student).

How can I, as the grader, tell whether this is a program they wrote or copied from someone else. The only means of detection available to me are the blatant case where multiple people hand in the exact same program, or if I recognize a particular solution from somewhere. Another hint can be that the work is way above the student's usual level (which is not an immediate indication of cheating, but does warrant further investigation).

This isn't hypothetical, by the way. I have graded papers, programming assignments and exams during my time as a Student Assistant at Leiden University.

Another real world example. With some papers I was grading, I noticed that one had much better grammar than that student (a Chinese exchange student) usually used. I put some bits of the paper into google, and found it was copied from another paper on the same subject.

Are these acceptable scenarios, to you? In all these case the students have learned nothing about the subject but still hand in correct answers to the assignments, despite not being multiple choice. There aren't always such telltale signs of foul play, either.

If you say "cheating is allowed", then there is no way to avoid this. How do you tell the difference between someone doing the work and someone copying the work if you're not there to watch them do it?

The "show your work" thing is nice when you want to avoid students just solving the equation using their graphing calculator. It does nothing to prevent them from writing someone's else's answer, which shows the work, it's just not their work.