Specification overfitting occurs when systems prioritize specified metrics at the expense of high-level requirements and task performance.