I prefer to squash away commits that leave the code in a non-working state. Because it makes using git bisect easier later if you need to find a commit that broke something.
Git can easily handle getting rid of or modifying commits, so why not make use of that ability in a controlled manner?
I.e. I'd typically not re-build the history of the master or another major branch just to fix a bug introduced a while back at the source (although I guess backporting fixes might be similar). But for work in progress, one or a few commits about to be merged, smaller fixes are better made at the source. Not to talk about entirely irrelevant commits like "it's the end of the day, let's commit and push to a branch so it's not just on my machine".