I agree with most everything said here, but I don't find homework to be all that bad nonetheless. Maybe I'm too immersed in university, having spent most of the past 11 years in some program or another, and as such lost focus on what high school homework is like. Maybe it changed since I was there. But I remember very little endless repetition homework.
So despite agreeing with the maligned comments about repetition not doing much for mastery (and certainly doing a lot of negatives, to a varying degree by individual) I mostly see homework do two things:
1) as Coro said, it's a place to make mistakes when you don't have a teacher there to lead you through something. You try something on your own, usually for the first time, usually after some amount of downtime between class where you learned something and when you actually do it. That trying alone tends to reveal things that classroom work/discussion doesn't.
2) what I see most of at the university level, especially grad school: just simply time spent working outside of class. I don't know if this would be counted as traditional homework judging by a lot of the comments here. I've written very, very few papers inside of any class, yet written communication is probably one of the few useful general skills picked up in college. I have one professor now who requires far more time spent working outside of class than we spend inside, and it's basically all doing work that she quickly explains in class. While I grumble about it feeling like being thrown into a lake to learn how to swim, it couldn't be farther from a lot of the arguments I'm seeing here.
This may just be anecdotes at work, but I don't even really mind most of the repetitive homework I have had. Maybe cause I never had teachers assign 100 math problems a night or anything. If I have 10 math problems in one section of homework that all deal with the same concept, if I know how to do them it's over fast and painlessly. If anything, I feel vaguely productive (likely a false sense of productivity, but nevermind that!) Helpful? Not past the first few, but pretty much a nonissue for me all the same. I can see where 90 more would be pointless but does that really happen all that often?
I do think repeated exposure helps for languages... if anyone has ever learned a second language to the point of simply being able to feel when something is off, or when you realize you're doing some reading/listening without translating it to your primary language in your head... in my experience, that comes from sheer exposure. That or immersion programs, anyway. :p They themselves are a form of extended exposure... just not in quite so mind-numbing a way. Rosetta Stone comes to mind as something some of you probably have experience with, though Rosetta Stone is not without its own flaws in trying so hard to be non-traditional. Some of us like having some grammar rules now and then!
I think there is something to be said here for the purpose of university in this country, too. We could probably have a whole thread about this, but I will summarize. If I'm studying to be a programmer or someone that maintains a network at a business, is it helpful for me to write a paper about Oracle's ERP products? Probably not. The network people I know at work don't exactly spend a lot of time writing reports... pretty certain they don't have to research anything at all. Pretty sure the programmers at work don't have to write anything at all, period (sadly, including comments in the code, but that's another story). You could argue these are worthless classes, and given my recent disillusionment at the normal bachelor's program structure in this country and my attempted forays into the job market I would agree wholeheartedly. Universities currently aim for that well-roundedness, though... and frankly it's what you sign up for when you go. If I had my say, I'd probably change the majority of university curriculum to be more practical. I'm not as set on the same idea for high school, especially for college preparatory programs, where I think exposure to many subjects is probably a good thing even if you will end up not using most of them. So when we talk about useless homework, this issue probably rears its head often and is something that should be kept in mind.