Restructing -> Dependency Injection

Why so often we have a lot of code which in idea was OK, but in usage not?

In my opinion it’s coming because we are looking for final version of refactoring, but between is existing one or are existing more Bridges which can help change the structure to flat list or/and to another structure.
Maybe are some Pokemons for this Task, maybe You know some magic tricks (methods)?