Manufacturing defects happen. Design defects happen. Even criminal activities by employees happen, but it's up to the leadership and the culture of the company to get on top of these issues and steer the ship back on course.
Overall Samsung has a decent reputation at competently engineering phones and batteries. But the way they've handled their responsibility for this issue is inexcusable. Ceasing manufacturing is about managing their own costs. What are they doing to actually help their customers?