Melacha of Carrying (Hotzaah)
The melacha of carrying from one domain to another is one of the 39 melachos forbidden on Shabbos.
The Prohibition edit
It is forbidden on Shabbos to carry things and objects from one domain to another. Within a "private domain" (reshus hayachid), even if it is a large house with many rooms, one may move objects without restriction, because the entire "private domain" is considered one domain, and moving objects within it is not considered taking them out of the domain. In the "public domain" (reshus harabim), however, a person may move an object only within his four amos, because the "public domain" belongs to everyone, and therefore each person may use only those four amos within which he is located. If the "public domain" is surrounded by a wall or fence, and its gates are closed at night, its unifying element, the common denominator, is revealed, and it then becomes rectified as a "private domain," and one may carry throughout it. To rectify a karmelis, there is no need to surround it with a fence or wall; it is enough to surround it with tzuros hapesach (doorway forms) alone, and thereby it becomes like a "private domain" within which one may carry[1].
Moving a Corpse edit
Moving a corpse is the prohibition of moving a person who has died, in whom there is no breath of life. On the subject of moving a corpse there is a great dispute between Rav and Shmuel. Rav holds that it is forbidden, because it is indirect moving (tiltul min hatzad), but Shmuel holds that it is permitted (by placing a loaf of bread or an infant on it).
The Gemara explains that even according to Rav, one may move the corpse by placing a loaf of bread or an infant on it.
The Permission to Move edit
The Ritva[2] says that since the loaf of bread or the infant makes the corpse secondary to them, it is permitted to move it by means of them.
As for why they permitted moving a corpse by means of a loaf of bread or an infant, Rashi[3] said that it is because of human dignity, and the Rambam[4] says that it is because a person is distraught over his deceased.