In 1995, the Samsung Chairman dismayed with poor product quality ordered a bonfire of his phones.
Twenty years later, quality is much higher priority at the company. As USA Today writes
Some tests are automated, while others involve more personal interaction. For example, devices are placed into a chamber filled with dust to test for faulty circuits. They're dropped in water or shot with a nozzle of water to see if they corrode or go on the fritz. Phones are tested to see how they handle sweat. They're twisted to determine how far they can bend without breaking.
Samsung drops the devices off a platform from various heights and angles, and analyzes them for cracks, loose parts or other damage. It's a good way to tell if they can survive a clumsy owner.
Can they survive the kid who loves to press — and keep pressing — buttons? To test this, Samsung runs an automated machine with knobs that repeatedly press the home button — Samsung won't reveal how just many times — until that button finally fails.