I don't think it's entirely stupid.
Eg math problems solved in class would be solved as a group so everyone learns the process, and homework is for problems which use those same concepts, but require more careful thought. Most of my math skills were solidified by solving challenging problems like that at home. Simply learning the concepts in school was not enough to build a deep enough understanding, but adding in a good homework component took me from having trouble handling basic algebra to unwittingly deriving basic calculus in an exam when faced with problems I didn't realize weren't intended for me.
Homework as just mechanical work intended only to take several hours per day is pretty stupid though.
As another point, how many of us truly shut out work when at home? Many of us still end up spending a few off hours a week programming personal projects or just reading up on and learning new technologies. I think homework serves a similar function for kids.