Code is not immutable. If it doesn't do something you need it to do, MAKE it do what you need it to do. Write a library, redesign a layer, simplify an interface, whatever.
I completely agree in principle, but in practice, the more software that is using the current version of the code, the more things will break when you change the design. That has the effect of making the code less malleable, proportional to the number of its dependents.
So for a function that is used only by your own program, it's no problem at all. For an in-house library that is used in several programs across your company, it's a bit of a hassle but doable. For a new computer language that is being used by a small number of devotees, it can be disruptive but worthwhile. For a library that is used worldwide by thousands of corporations, it has to be managed extremely carefully. And finally, for a ubiquitous computer language (e.g. C++) that has billions of man-hours of code that needs to keep working, breaking backwards compatibility might not be practical at all, no matter how great the benefits might be.
I think the moral of the story is: rewrite and redesign your code to make it as awesome as possible before it gets too popular, because afterwards you'll be stuck with it. :^)