Refactoring aimed at improving code quality mainly solves the problems of repeated object creation, insufficient readability, and inconvenient testing. It improves performance, maintainability, and testability without changing the original functionality.