Pretty much all fridges these days have a magnetic door opening, but it wasn't always that way.
If you were to climb inside one of these nonmagnetic fridges, you probably wouldn't be able to get out again.
To make things worse, the rubber around the door would create a seal – to keep the cold in – making it harder for anyone to hear you calling for help.
Obviously most people don't go climbing into fridges, so you might not think this is a big deal. But you're not a small child playing hide-and-seek.
By August 1956, so many children were suffocating inside fridges that the United States passed the Refrigerator Safety Act.
The act said that all new fridges had to be openable "easily from the inside". A few years earlier, in 1951, California had passed a law that made it illegal to dispose of a fridge where children could access it, and a couple of years after that they added an amendment that required people to remove doors or latches before discarding them.
Switching to a magnetic opening and closing mechanism meant that fridge doors would stay closed when you wanted them to, but could be opened from the inside with a little bit of a push.
Scientists even conducted research to see how children would react when trapped inside fridge-like enclosures.
The above figures come from a paper titled "Behavior of young children under conditions simulating entrapment in refrigerators" that was published in 1958 (and, presumably, would not make it past an ethics board these days).
The paper had two key findings: The first was that, when trapped, children tend to push on the door to try to escape; and the second was that 3-year olds can push on average with 10 pounds of force, whereas 5-year olds can push with 21 pounds. The data from the study was used in developing standards for fridge doors.
Of course, passing the act didn't solve the problem entirely.
A 1985 study published in Public Health Reports looked at the data from California on how many children between 0 and 9 years old died from suffocation in a fridge or freezer. The researchers found that between 1960 and 1981, such deaths fell by half, from just over 1 child per million to less than 0.5 children per million. (There was actually a spike in the late 1960s, but the researchers put this down to the typical 1950s fridge having a 15-year lifespan.)