Really. I don't think arguing is the right word, but debate doesn't seem right either. It puts your own knowledge and smarts to the test and you learn a bit from the person you're arguing with. Of course, when discourse starts to become draining and takes a negative turn, it's best to stop.
Of course, when someone takes advantage of you walking away and rubs your nose in it, that's always in bad form.