When I write code, I write it as well as I can, and I will usually be happy with the result. Then I write more, and as the nature of the problem I'm trying to solve becomes clearer to me, I think of better ways to model the problem and the solution. Later, when I come back to the older code, I will rewrite it to fit the new style.
I am not, at that point, unhappy with the old code. It was written with great care. The fact that I changed my perspective and will proceed to rewrite it with great care does not change that.
I am unhappy with code on a daily basis, but rarely my own. I fully and proudly own up to this, and my intention to rewrite other people's code is not some kind of primitive urge to exercise my power.
It's simply that most code isn't written with care or foresight at all. Those who write the code usually protest the rewrite with "why change it if it works?", but with that kind of thinking you might as well write everything in assembly.
I write code with great care, and I imagine that all who do so would gladly accept suggestions for improvements. That's the kind of humble I think we should be shooting for.
Code is never finished, it's just released. Then modified, and released again. Then abandoned.
But then, I don't spend a lot of time writing code. I spend most of my time reading other people's code, and most of it is . . . well, let's charitably call it mediocre. But occasionally, I'll come across a piece of code and think, "Hey, that's actually pretty good! Who wrote that?"
Usually? It was me.
Put another way, code that I write under duress to get a job done, I hate at the time. But later I am quite fond of it. Code that I write at a leisurely pace and to my satisfaction, I am proud of at the time. But later it looks naive and foolish.
Good programmers always see room for improvement. Bad ones don't know that their code is bad (and everyone's code is bad. Apart from maybe Knuth.)