There is the possibility that the government builds housing, since the government doesn't have to care about direct profits and can include the overall economic effects of affordable housing in its calculations. We don't expect much direct profits from roads either, but we keep building more and more of them.
Because they don’t care about profits, they always end up overpaying and taking way longer time than necessary.
And who pays for that? The whole society: Either the government raises taxes, gets more in debt, or they print more money driving inflation up.
The most basic commodity, food, is a great example. The moment the government has ever step into controlling production of food, we’ve only seen subpar performance and starving people as a consequence. Ultimately killing millions (USRR, China, Korea…)
That is a good idea that requires careful attention to make sure it has near-perfect execution. Because we do that, and they are called 'the projects'.
That only makes sense if there is a positive externality from housing. Is there?