And to pass an exam students have to prepare for the exam. Homework will only help there if it is similar to the exam.
One time I had to evaluate a written exam where the professor had set up a trap. There was a question that looked like a standard question from homework, but if you used the standard-techniques from the course your calculations didn't work - it was a nasty special case. Most people that started with that question just burned 30 minutes without getting anywhere... a lot of students failed, but at least they learned something about life...
And Oral exams are different. Giving a quick well prepared answer and being able to solve difficult tasks over a few days are completely different skills. Students there prepare for the professor. There are transcripts of previous oral exams. And professors change over the years - the final tough question of an excellent student will a few years later become a starting question. People that didn't know that game and didn't have access to any transcripts were in serious trouble... None of the Homework would have helped in the oral exam.