Market failure is when the evaluation of something in terms of its pure utility leads to far-from-optimal societal outcomes because the secondary value of positive or negative externalities is not being taken into account by the market.