In answer to your first question, there are a few situations that come up that can cost a lender more to foreclose than simply writing off the entire loan.
A lender that owns a property is legally responsible for that property. If it has legal or physical conditions onsite that must be mitigated or cured and the costs of cure exceed their loan balance they are sometimes better off to just walk away. Junior lien holders can easily find themselves in the position of having no equity to recover if the value of the property is less than what they need to sell it for in order to net a return.
On a $600k property financed with an 80% 1st and a 20% second, the junior lienholder has nothing to gain if the value of the property declines (or was never worth) at least $550k, because by the time they foreclose on their 2nd and satisfy the 1st, and sell the property off their costs will exceed the difference between the 1st and what they net from the resale. They’re better off just writing the loan off and walking away.
As for the second question, the short answer is: both types of markets will compress. Once you get past basic shelter requirements (buy vs. rent), the different sales prices are relational to each other, not based on any kind of intrinsic value. Even cost doesn’t represent a floor for value; there are areas where houses can and do sell for less than the sum of their costs or their salvage value.