There are different cases. There is no need for goldplating - sure, but developers can understand different things by "overthinking". First of all, startup should have a strong vision to start with (your comment about pivoting away just means your software is a prototype, so it's ok).
I argue, that code and architecture should always be treated in the way, that allows changes in the future. When developers are good, they can't even produce the code with less quality, meaning, there is really no overhead in having your code like Lego system from the beginning instead of shaping each piece individually.
I guess, the "popular believe" is due to the fact, that startups hire mediocre devs at best, who can't bootstrap rapid application development code architecture. This is understandable, but may be fatal for a startup.
That is why I challenge the presented claim. When writing software one should know if it's a throw-away prototype or coming production software. There are also methods, like "tracer-bullets" - proof of concepts, which can advance the production code.