It says not to combine refactoring with bug fixing. But like any advice, it's relative: a drive-by cleanup can be easier for everyone than reviewing a separate PR. And sometimes a refactor makes the bug (and all related ones!) vanish or trivially caught.
To quote Kernighan and Plauger: "Don't patch bad code: rewrite it".