Some of manufacturing techniques created a short in both the original and replacement batteries leading to a loss of over $5 billion as the entire product line had to shutdown and recalled.  A new 8 point safety program was instituted to prevent future issues.  

http://www.pcmag.com/news/351205/samsung-blames-bad-batteries-for-galaxy-note-7-disaster

The Galaxy Note 7 counts as the worst smartphone launch on record. The handsets were all faulty, even the models Samsung claimed were fixed after an initial recall. In the end, not only were all Note 7 recalled, Samsung took action to disable any remaining handsets so as to avoid having any still in use exploding and causing more harm.

When metal is machined it can be left with sharp protrusions known as burrs. Battery B suffered from “high welding burrs” which penetrated the insulation tape and separator inside the battery and caused a “direct contact between the positive tab with the negative electrode.” Additionally, some of these B batteries did not include the required insulation tape. The end result was the same: a catastrophic failure of the battery.

So ultimately, Samsung shipped a bad battery, quickly replaced it, but did so with another bad battery.  Unsurprisingly, Samsung is introducing a new 8-point battery safety check going forward. It will ensure all batteries undergo a durability test, visual inspection, X-Ray, charge and discharge test, Total Volatile Organic Compound (TVOC) test, disassembling test, accelerated usage test, and Delta Open Circuit Voltage test.