They literally have boxes and boxes of phone parts made.
This ^
It costs about the same to make 1 unit as it does to make a full run. Depending on the equipment, that could be as high as 10,000 units. Since it means reprogramming and reconfiguring the assembly line when you make a new part, they will make multiple runs until they have made enough to fill their total sales estimate.
The cost of the glass and metal and components is not a factor, and they will have most every part for every Note 7 that they will ever sell sitting in a box on a pallet in a warehouse. It's cheaper to recycle the material for the ones that don't sell than it is to not make them all at once.
And for the record, Samsung is also a defense contractor. Chances are they make enough money building things to kill people that they can lose money on every other department and still be very profitable.