Housing codes determine what is acceptably "habitable" and what is not. The laws are also more strict when the residence is a rental property, as American society would like to discourage absentee or delinquent land-lords and help protect tenants from bad situations where your land-lord is supposed to be maintaining a property but instead tells you to "go live with a relative" when the heat is out.