I commit often in scenarios where feature I'm working on is complicated and I've broken it down to smaller tasks. When I finish one task A and move on to B, I might end up in situation where A is not actually supporting B so I might need to refactor A . So when I finish A,B and C, refactoring for for A is not needed anymore and in this point, if I wouldn't have the history of modifications to A, I would need to rewrite it, or at least parts instead of just reverting.
And finally, I squash all commits to a single feature commit.