When someone dies at the hospital, the body is moved to the morgue, for temporary storage. Today's morgues are refrigerated, of course, to keep the bodies from decaying too quickly.
Dying (like birth) used to be something that happened at home. When hospitals became the centre of all health care activities, people began to think that death (like birth) was an event that should happen in the hospital. Now attitudes are changing again, and many people with terminal illnesses prefer to die at home. We seem to be coming full circle.