Refactoring changes the programs in small steps. If you make a mistake, it is easy to find the bug.
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
Refactoring is a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior.