It is a hybrid procedure between sleep and hibernation called «Safe Sleep».
Almost all owners of mac laptops, be it a MacBook, a MacBook Pro or recently a MacBook Air, know that when the lid is closed the equipment is suspended and that we can move with it in this state, even keep it in a case or briefcase since this it does not generate heat of any kind and does not move mechanical parts that could be damaged like the hard disk. However, at the moment we close the lid, we can verify that the light that indicates the suspension remains on for a few seconds before starting to blink.
What do means this?
Simply, the time that the light lasts is the time it takes for the memory to be dumped to a temporary place on the hard disk in order to preserve the contents of the RAM even if the battery runs out or we remove it for some reason. When removing the battery, as expected, the light that indicated suspension goes off and does not come back on to re-power the equipment but there is no need to be alarmed, our work remains on the hard drive and will be moved to its original place in RAM to show us everything we had loaded before closing the lid.
Note: The PowerBook G4s keep the light on for a few minutes if the battery is removed as they have a small internal charge to allow "hot" battery swapping without having to resort to their "safe sleep" disk image.