Short: If we do not inspect our code we do not learn from our mistakes. Improving at anything in life depends on to what extent and how we reflect on what we are doing it, and how we are doing it.
Development activities are full of switches between development and maintenance, between creation and modification. (This is something very positive, and something we in software development can enjoy without many of the costs present in other development disciplines.)
At the micro- or coding level, the software development activity consists of constantly switching between two modes and mindsets: Developing new code and maintaining the developed code.
Broadly speaking, developing new code is the creative activity where you run many ideas through your brain, quickly invalidating and validating them, finally arriving at a solution choice. After choosing the solution, you create a model of it (using the tool of your choice, usually a high level programming language, as far as developers are concerned). At this point, we are prototyping and molding the solution, learning at each step of the way. We are in the create mindset.
After a chunk of a solution has been created, you instantly turn into "maintaining mode" - where you critically inspect it, change it and redo some parts.
I view this as maintaining since we are focused on issues other than fulfilling the basic functional requirements, namely maintenance. At the simple end of things, we may just look at the code quickly to revise variables. Getting a little bit more involved, we may look after refactorings within the class we just created. On the more thorough end, we may also scrutinize the broader design, looking for ways to make it clearer and cleaner. All of these tasks, whether large or small, address the maintainability aspect of the code. We are in the "maintenance" mindset.
All of these tasks obviously depend on the switch. Of course, there has to be code to inspect, but beyond that there is learning going on during development, that is necessary in order to inspect fruitfully.
Switching mindset the other way is even more important, I think. While inspecting our code in the maintenance mindset, we come to look at the design differently and learn from it. The next time we create our solution, we benefit from what we have learned.
So simple I almost don't know why I wrote it. Yet, somehow some developers seem intent on only developing. Or maintaining. Or testing. Doing a little bit of each is better.