John Lee, the city’s chief executive, said the city’s housing secretary would step down, but he vehemently defended the government.