From Peter Boettke’s 1997 paper Where did Economics Go Wrong? Modern Economics as a Flight from Reality:
Previously, the model of a perfectly competitive market was primarily used in thought experiments designed to be contrasted with real-world market institutions. Such counterfactual thought experiments illuminated the positive function of those institutions. In a world of complete information, for example, neither firms nor profits would logically exist. Therefore, the contrast of this imaginary world against the real world of firms and profits showed that such institutions may have some functional significance in coping with imperfect and incomplete information.
This counterfactual use of the theory of perfect competition was reversed by the formalist revolution in economics. The departures of reality from the model of perfect competition were now thought to highlight interventions in the market ecnomoy that would be necessary to approximate equilibrium. Competitive equilibrium and the maximizing behavior that would ideally produce it represented the hard core of the research program f economists from 1950 on. As this happened, economics as a discipline was transformed.