Good software must be maintainable. It is very rarely the case that a piece of software is developed once and then never nedds to be changed again during its lifetime. This is especially true of user-developed software such as spreadsheets, whose big advantage is that they are easily modified.
Even if the requirements do not change, any reasonably sized piece of software is most unlikely to work properly at first; changes will have to be made in order to remove bugs. In fact, the whole process of development can be seen as one of maintenance, starting from a situation in which nothing works at all.
In the worst case, a simple change requires the whole piece of software to be rewritten from scratch. In the best case, really quite significant changes to the functionality require only small changes in the code. The secret is to write good code and to document it effectively. In this context, good code is code that uses techniques of abstraction and modularity.
The following external links are relevant: