Design is the stuff you have to think about upfront because you have to have at least some mental structure of the software you’re going to write.
You don’t just sit down and start writing code.
So whether design is an intentional act, accounted for in delivery processes and timelines, or whether it is considered an overhead cost or point of friction in the development process, it still has to happen.
The problem with design-on-the fly is that it’s applied at the narrowest possible point - the point closest to the problem.
This comes at the expense of the system as a whole because it introduces the risk of duplication, errors, incompatibility, coupling / dependencies, inefficiencies, and unnecessary complexity.