I had a teacher that didn't give homework once. He was a better teacher than all of the ones that did give me homework combined. The ones who payed attention in class passed the class, those who didn't pay attention failed the class. But everyone passed the Regents examination, something that none of the other teachers ever accomplished.
Homework reinforces skills that have been taught during the school day or prepares students for new content or have them elaborate on content that has been introduced. It also gives the student the opportunity to get extra practice and work independently. Learning new content requires practice and revision.