The city lost 5 percent of its housing stock, the mayor says, and was struggling with a shortage before the fire.