This is a paper on the theory of institutions. It provides a rationale for the presence of firing costs in OECD countries based on a market failure that takes the form of an externality. Workers have firm-specific and industry-specific skills, and in each period there is a nonzero probability that a worker quits. The quitting probability makes the private discount rate (used by firms in making decisions about firing workers) higher than the social discount rate. This generates a "quitting externality", where firms lay off too many workers in a recession. Firms are too quick to dispose of their human capital in a cyclical downturn because it is of less value to them than it is to society. State-mandated redundancy payments become a second-best remedy to overcome the market failure.