I think this doesn't take into account several prespectives. There is the potential for harm caused by an ill-trained programmer in the professional field. Although we'd like to think that such a person would never get a job, we must face the reality if not the strong possibility that that is not the case. And that reality, sadly, is frightening. Software errors have caused patients to be severely burned by radiation, missile defense systems to fail, allowing soldiers to die needlessly, and multi-million dollar spacecraft to fail spectacularly, costing all taxpayers.
The student will engage in unethical practices when turning in this homework, but ultimately the harm also falls on the student. Using a bit of common sense, it's unpractical to think that a student could go through their entire college education by buying homework from others. The student would eventually be tested and would fail due to not knowing the necessary material. Further, assuming that the student did manage to get a degree, the student would fail to operate as an employer would expect someone with a degree to operate. No part of this harms anyone except for the student.