When you're printing plastic it's really easy to quickly end up with lots of small bits and pieces of stray plastic all over the place. This is especially true in the bed area where you're extruding plastic, getting stringers (hopefully not too many or too often), etc.
Normally they don't cause any problems and are more of a nuisance that a hazard. But there are exceptions, as I found out a few weeks ago. My printer had been operating quite consistently and without any major problems, to the point that I developed enough confidence to leave it running printing a large part overnight.
When I checked it in the morning, everything looked fine. The part had finished successfully and looked OK. After replacing the bed glass (I have three sets so that I can just swap the glass rather than cleaning and re-taping if necessary), I started the next print.
The hot end came up to temperature, and the bed started moving up to the z-axis zero position. Thinking everything was going as expected, I turned away from the machine to check something on my PC, only to hear a totally unexpected noise - the head crunching into the bed and ripping the tape as it started to make the first layer skirt print moves.
Luckily, it didn't do any damage to the head or the bed, but it did take a bit of time and detective work to figure out what had happened. Finally I discovered a stray piece of plastic down behind the rear edge of the bed.
Apparently it was just in the right (or wrong) position to hit the z-axis limit switch body without triggering the switch. As the bed moved up to zero itself, the limit switch was pushed up the mounting bar until the head hit the bed and stalled the drive motor. The switch never triggered, but the software must have some limits built in that allowed it to decide that the z-axis was zeroed, and it started the print moves.
Removing the stray plastic was easy. Resetting the limit switch proved to be a bit more challenging. There is no fine adjustment. Basically you get the switch as close as possible to the point where it triggers when the head is extremely close to the bed without touching it - just less than the thickness of a single sheet of paper.
Thankfully, you don't have to get it perfect. There are z-axis offsets in the software tools, like Slic3r that allow you to correct for small differences. In my case I was extremely lucky. After six attempts (about 15 minutes of fiddling), I managed to get the switch set so that no z-axis offset in the software was required.