I only ever did the homework I was interested in and quite a few times it helped me understand it better.
Just practicing math problems, or typing out notes and essays, or even practicing a new language... That's all stuff that is useful. Sure you can go without, and probably schools assign way more than they should (I know it was the case for me), but homework itself at least is not a negative thing.