You are dreaming if you thing that foreclosure generates “profit” for the banks. Usually, every foreclosure means a huge loss.
Perhaps for the investor. Bank of America is a huge Servicer of these loans. They make money no matter what.
A very important component to this is being overlooked here. Many, probably the majority, of these foreclosures involve borrowers who were making agreed upon Trial Mod payments.