"That's the thing" is like they're saying they agree with the other person-- they're surprised that people would want to live in a place like that, and agreeing that it's strange-- and yet, hundreds of families want to buy the houses. You could also say "That's the weird part."
In this example it's another way of saying, "Yes, that's the problem."
Person A: He wants to buy a car.
Person B: What? But it's too expensive! How can he afford it?
Person A: That's the thing. He needs $500 more to pay for it.
I hope this makes sense ^^ Great question! This is a pretty common phrase.