Programmers know this, but I’m not talking about code.
In any field, it seems, optimization creates inflexibility. This is because optimization (maximization of performance) generally requires assumptions about the continuity of conditions.
In computer programming, you gain great speed benefits by writing graphics software in assembly language, rather than a compiled language such as C. But assembly is purpose-designed for a single microprocessor family. Change families, and all your work must be thrown away. So this optimization require one big assumption about future use of your software.
In investing, you can gain higher returns with leverage. But the greater the leverage, the more central your assumption of price stability or continuity, the greater your reliance on avoiding one really bad day, and its associated margin call.
In advertising, you can maximize conversion rates by having each CPC ad click through to a specific landing page designed for that ad. But the amount of work required to make a campaign-wide change increases by an order of magnitude.
Maximizing international trade optimizes economic output but greatly increases exposure to common-factor economic collapse, such as a discontinuity in the oil supply.
Thus optimization increases performance (narrowly measured), but also exposure to Black Swans.