It’s not that it’s valueless; it’s that you can’t sell it without a loss, generally.
They have to foreclose and put it up for auction when the buyer defaults. A family on our street sold their prior house for something like $280,000 a couple of years ago. They found out it was foreclosed on and sold at auction for $40,000 IIRC.