Actually, there are two reasons that banks are sitting on foreclosed properties. The first is that the federal government has been pressuring them to do so in order to make it look like the housing market has fully recovered from the crash. The second is that if they sell all of those houses at what the market would bear, they would have to take the loss on their books. As long as they hold onto those houses they can pretend that they have not taken a loss on them --"We have 5,000 houses worth $200,000 each. Which means we have $1,000,000,000 in assets. " as opposed to "We have $500,000,000 in assets. (after selling those 5,000 houses for $100,000 each)."-- Of course if they put all of those foreclosed houses on the market, their return versus their booked value would be even less than that.
And that second scenario would likely result in their assets vs deposits falling below what they have to maintain to remain a FDIC insured institution. It might also lead to problems with SOX regulations as well.