The car repair analogy isn't a good one. A better analogy would be to compare it to the engineering design process to make the car.
Refactoring is the action of reviewing the code and re-writing it (internally only). Refactoring is in most cases done to increase readability and reusability (once again, internally only) which usually results in better maintainability. A by products of refactoring is detecting defects and optimization opportunities.
Key here is that the process may reveal optimization opportunities and software issues.