The city chose to buy an existing building, slashing the cost of bringing new affordable housing units onto the market.