First, although a market may be efficient, it isn't necessarily fair. In fact, fairness, or equity, is often in conflict with efficiency.
The second caveat is that markets sometimes fail. As mentioned in Chapter 1, under some well-defined conditions, markets can fail to deliver efficiency. When this occurs, markets no longer maximize total surplus.
Third, even when the market equilibrium maximizes total surplus, this does not mean that it results in the best outcome for every individual consumer and producer. Other things equal, each buyer would like to pay a lower price and each seller would like to receive a higher price. So if the government were to intervene in the market—say, by lowering the price below the equilibrium price to make consumers happy or by raising the price above the equilibrium price to make producers happy—the outcome would no longer be efficient. Although some people would be happier, total surplus would be lower.