Fees Preventing Mortgage Companies From Modifying Loans

I can’t seem to grasp what they are talking about here.  Maybe you can.  “Even when borrowers stop paying, mortgage companies that service the loans collect fees out of the proceeds when homes are ultimately sold in foreclosure. So the longer borrowers remain delinquent, the greater the opportunities for these mortgage companies to extract revenue — fees for insurance, appraisals, title searches and legal services.”