You were once as wrapped as snug as the pony in the picture. Before you were born, you sat wrapped inside a placenta tucked inside your mother's womb. That placenta was the very first reproductive structure your body built, long before you built your testes or ovaries or genitalia.
But even though the placenta is unique to our branch of mammals, it echoes a even more ancient structure — the membranes that are found inside the shelled eggs of reptiles, birds, and egg-laying mammals like echidnas.
These eggs have three membranes, arranged in layers around the developing young. The layer closest to the embryo is the amnion, which fills with fluid that cushions and protects the young as it grows. Spreading out from the embryo is the allantois, which sequesters the embryo's liquid wastes. Surrounding it all is the chorion, which fuses with the allantois to form a two-layered membrane that absorbs oxygen and dumps the embryo's carbon dioxide waste into the outside world.
The mammalian placenta is built of the same layers. Its chorion grows into the mother's uterine wall, forming a network of capillaries immersed in mother's blood. The membrane still absorbs oxygen and removes carbon dioxide as it did in shelled eggs, but now takes on the additional responsibility of swapping food and waste between mother and developing offspring. Rather than sequestering wastes, the allantois becomes part of the umbilical cord, the highway that moves these materials between placenta and embryo. Only the amnion remains exactly the same: a thin, tough membrane that holds a liquid cushion around the growing young.
[Source: Liem et al. 2000, Functional Anatomy of the Vertebrates; Moore and Persaud 2008, The Developing Human]