Keep in mind, it’s likely that more people cheated, but the smarter ones changed just enough code to make it look “their own”, or actually tested to ensure it’d work, and thus weren’t caught. Those 22 caught are very likely the ones that copy-pasted verbatim.
Then the smarter ones fulfilled the task, knowing and understanding the material enough to provide a working solution, rather than paste a non-working one. They may have done less than someone working from scratch but they showed themselves no less competent in the material.