Buy to let investors, can get interest only loans and they can then sell the asset, after 20 years, to pay back the original cost of purchase. They can also charge a rent which provides them with a substantial profit, ie; the difference between the interest only rent, maintenance costs and the actual rent they charge. They then get to keep the profit from both of these agreements, if there is any, and walk away.
Social housing, of course, should not be based on profiteering, but the state retains the asset, so that future generations can use the house.
We don't have to allow the market to rule everything. Its not, always, the most efficient or fairest way of doing things.