NEW YORK—Another danger lurked as fire and smoke swept through the upper floors of a Brooklyn public-housing high-rise: junk.