When you pop the first balloon with the nail, all of the pressure is concentrated on one point on the balloon so the balloon easily pops. When you place the balloon on the bed of nails, the pressure points are spread all across the surface of the balloon.
Just like the balloon, when a person lies on a bed of nails, their body is evenly distributed across the surface of the nails. The only real danger of being punctured by a nail is if the performer doesn’t lie down or get up correctly and pressure points of the nails are concentrated on one area of the body. Now you know the circus secret!