this book is a beautiful comment on our endless cycle of consumerism, and how through neglecting the consumption of unnecessary products and entering a "cocoon", we can grow as a person and turn into a beautiful butterfly.
It starts in the early phase where the caterpillar first starts consuming the leaves, but then entering the later caterpillar phase where it starts consuming more and more unhealthy substances such as lollipops. This is a metaphor for gateway drugs that start out relatively harmless but then lead to the user desiring something with more "kick" and so the cycle continues until they are consuming alarmingly dangerous substances.
But then the caterpillar enters the cocoon and neglects the needless consumption of materials, leading to it evolving as a life-form into a graceful and elegant butterfly, which is the pure embodiment of neglecting consumption, as butterflies do not consume any food at all in that state. The butterfly would in the Buddhist sense reach enlightenment as they have neglected all want or need in their life.
Once the caterpillar, now a butterfly, he metaphorically and literally ascends above the other lifeforms as a creature free of craving and lives a short yet purely blissful life.