system
Given the following post, respond as if you're commenting on Reddit:
human
Who actually owned the houses in "The Big Short"?

Apologies for my terminology, I'm a layman.

So I've watched the movie and read the book(s) a number of times and I'm still not quite sure I understand who actually owns the houses once they are foreclosed on? 

For example, let's say me, someone chasing the American dream, buys a house I can't make the repayments on. I have bad credit (etc) but it doesn't matter: the banks say I'm good to go.

So now, the Big Bank (TM) rolls my mortgage alongside a number of other similarly dodgy ones into a CDO (thereby diversifying the pool) and sells them on to "Stupid Germans" running retirement funds, etc, with the promise that (a) the contracts will yield returns across the lifetime of the contract, and (b) the contracts are not inherently risky.

Down the track, these things start to default, (I can't make my repayments) and those who bet "against" such contracts through other instruments like the CDS can make big bank. 

So getting to the question: Since the original underlying mortgages are in default, who actually owns the house? Is it the bank in which the original loan was originated? And if that's the case, then how or why were those same banks allowed to essentially bet against their own customers' mortgages?
gpt
There was a lot going on and there's a lot to unravel, but at a high level, this is what was happening:

Bank lends money to a poor credit.  The bank funds the mortgage by "securitizing" it, which essentially means they sell it to a bankruptcy remote special purpose vehicle (SPV) incorporated in the caymans or wherever, which in turn issues notes to investors.  

The notes are tranched, which means the notes are broken into multiple classes and are paid in order from top to bottom.  The A notes receive a good rating from the rating agency and they're sold to pension funds, etc.  The lower classed notes are sold to investors with larger risk appetites. 

All the way at the bottom is the "equity," or the residual interest.  These are highly risky and unrated.  Sometimes the bank could sell these, but sometimes it just kept the equity on its own balance sheet.

At some point, investors like Burry wanted to bet against these notes.  As shown in the movie, investment banks structured credit default swaps to accomplish this.  The CDS is essentially a bet that some basket of notes will fail.  The opposite of that bet is a synthetic interest in the notes.  So Burry would pay the equivalent of interest (or premium) and the swap counterparty in return would promise to pay out if the notes defaulted.  From the swap counterparty's perspective, it was as if they owned the notes directly. 

When the housing market turned and all hell broke loose, the servicer (which is the entity that actually manages the mortgages on behalf of the securitization SPV) would foreclose on the loans.  The property therefore belonged to the SPV and the proceeds from the sale of the property would go towards paying off the noteholders.  The A notes got the money first, followed by the lower class notes.  

When the SPV ran out of money, the notes defaulted.  In parallel, this triggered a payment under the CDS.  The swap counterparties experienced a default just like the noteholders, except they never owned the notes. 

There is a lot to be said about why any of this was possible in the first place, and Dodd Frank and other regulations have been passed to address some of the underlying incentives.  It's a different discussion whether any of those regulations worked in the way intended, but hope the above sheds some light on what was going on.