Refactoring is usually described as a way to keep software as simple as possible, or as a way to reuse parts of a software system that were not designed to be reusable. But it has other uses.
One of the problems with using software components is that new versions of the components require changes in the systems that use them. If the change from one version of a component to another is described as a set of refactorings then the parts of the system that use them can be automatically changed to use the new versions of the component. This makes it much easier for developers to use the latest versions of components.