On a basic lien search the property came back clean. But the city had open code cases on it, quietly piling up fines every day for years — they just hadn't hardened into liens yet. The buyer saw it before the offer went in, not after the keys changed hands.
A normal search only catches a code problem once it's a lien. By then it's the new owner's bill.