When the failure sheet costs more than the car
Every year thousands of otherwise usable cars are retired by a single MOT. Structural corrosion is the classic example: welding is skilled work, the price is hard to predict before the grinder comes out, and the finished car is worth no more than it was before.
Emissions failures on older diesels can be similarly awkward. A blocked particulate filter, a failed exhaust gas recirculation valve or a catalyst past its useful life can each cost several hundred pounds with no guarantee the next test passes.
At that point selling the vehicle in its failed state is often the rational decision. You stop spending, the car leaves, and the money that would have gone into a retest goes somewhere more useful.