Samsung also has a very long track record of producing cell phones that are deemed safe which neither Anker nor Amazon can match in batteries. You either need an extensive positive record to easily bounce back or need to be willing to write it off as an auxiliary business (e.g. if Amazon had battery issues).
People buy Samsung phones because they're good phones, people buy Anker batteries because they're good batteries. If they start exploding people will find some other, better battery brand.
Admittedly a phone that explodes is a bad phone, but Samsung can still sell its "good phone" brand the same way Apple can still sell its laptops.