Do new programmers always say that the old code is bad so that they can write their own new code?
Usually the old code is “bad”. But by bad, I don't mean that it doesn't work, rather, it's like you're learning when you code. So if you check your old code, even you will do things differently later because you have learned better patterns, so usually you could make “better", i.e. more readable/efficient code.
I also think it is recommended to rewrite your code from time to time, if you have other reasons, for example, if you need to add a function, why not refactor/rewrite the code for higher standards? But there is a strong emphasis on another reason, don't just waste time rewriting because this process rarely benefits the client, what he does is to benefit the team working on it or using it because it will be easier to maintain.
My experience shows that there are excellent programmers and excellent code editors. They rarely inhabit the same body. I think this is true not only for programmers, but also for everyone who writes creatively. In any case, sooner or later you will still encounter Code Rewriting and it will be unpleasant for you to do it.