There are lots of ways to rewrite history and clean it up. Rebasing is just one of them, and it's one that can force you to spend more time resolving conflicts than you otherwise might have to (since you have to replay all of your commits and resolve any conflicts caused by each one individually).
There's no reason why rebasing is a better way to clean up your history than squash merging (or even -- carefully -- using git reset).