A successful short sale can be a win-win for both the bank and the buyer. A foreclosure is an expensive and time-consuming process for a lender. By agreeing to a short sale, the lender can save time and wrap up the mess quickly, and perhaps with less of a loss than it would have incurred with a foreclosure.
Remember,the foreclosure process is a legal proceeding and there are extensive legal and court fees as well as a lot of time spent dealing with the mess. Also don't forget that after foreclosing, the lender now owns the home and has to maintain it, insure it and pay taxes on it. Then they have to pay a real estate professional to dispose of the property when they finally get possession of it!
So instead of receiving mortgage payments each month, the lender is now forking out money month after month until it is sold. Plus, short sales help the lender look good on paper -- the property never gets listed as an actual foreclosure, which helps the lender's numbers. They see it as the lesser of two evils -- if the numbers make sense for them.