Animals produce offspring by two principal modes of reproduction. Vivipary (or viviparity) means producing ‘live young’—readily recognized as ‘living’ because newly produced offspring wriggle, squirm, squall, or squeak. The intended contrast is with ovipary (or oviparity)—producing eggs that house an embryo inside a shell; usually the eggs do not wriggle or squall. Of course, fertilized eggs are not dead, as might be supposed by the contrast with ‘living’ young! Fertilized eggs are very much alive, but early development takes place inside the shell instead of inside a parent. All the nutrition for early development inside an egg must come from the egg yolk and therefore be provided by the parent before the embryo is enclosed in the eggshell.
(There is an intermediate condition –ovovivpary/ovoviviparity—in which fertilized eggs are held within a female and hatch inside her. The embryo may be nourished by eating other eggs or embryos or perhaps by a kind of placenta, with a direct connection to the mother. This might indicate ways that, in the course of evolutionary time, vivipary evolved from ovipary. But leave that aside for present purposes.)
Vivipary and ovipary—these two modes of reproduction are scattered widely in the animal kingdom. It would be convenient if we could make lots of solid generalizations about either of these modes of reproduction, either about their taxonomic distribution or about their advantages and disadvantages. But alas, not so. There are only a few strong generalizations and there are almost always exceptions. Consider first the birds and then the mammals.
All birds lay eggs. That’s one good generalization with respect to taxonomy. But how birds treat their eggs varies. Most birds make a nest in which the eggs and then the chicks are tended—ducks, hawks, most songbirds are examples. However, brush turkeys and mallee fowl in Australia don’t incubate their eggs in the conventional way. Instead they build a huge mound of dirt and vegetation, in which the heat of decomposition incubates the eggs. An adult may guard the nest and regulate temperature in the mound by opening or covering it, but that’s the extent of parental care.
In fact, not all birds make nests; several species of songbird and duck are brood-parasites: they avoid all matters of nest-building and parental care by laying their eggs in the nests of other birds. Penguins provide another exception. Emperor penguins and king penguins make no nest; they lay single, large eggs that are incubated on a parent’s feet, with a fold of skin covering them. The incubating adult can even shuffle around with its egg carefully held in place.
All mammals nurse their young; that’s the very definition of a mammal. But although most mammals are viviparous, not all of them are. The platypus and echidnas in Australia are exceptions, laying eggs. Some mammals make nests or dens for their young, some carry their offspring around, but others do not do either of those things.
There is also variation among the other vertebrates; for example, some snakes and some fishes are viviparous while others are oviparous. Among the invertebrates, vivipary is widespread, having evolved many times and occurring in many different taxonomic groups, but ovipary seems to be more common.
One broad generalization does seem to hold true: vivipary apparently necessitates internal fertilization of the eggs by sperm that are placed inside the body of the female. No such limitation applies to ovipary; some oviparous animals have internal fertilization and others do not, releasing sperm and eggs into water at the same time.
Scientists have long discussed the relative advantages and disadvantages of each mode of reproduction, but to my knowledge, they have not come up with a comprehensive explanation for the evolution of either mode. There seem to be exceptions to almost any general statement, and it is likely that different factors and different conditions have led to the evolution of one habit or the other in different evolutionary lineages.
Among vertebrates, egg-laying commonly means eggs are placed in some kind of nest while the eggs are incubated or tended by a parent (exceptions above). That means the adult is temporarily tied to one place (the nest) until the eggs hatch and, in many species, the chicks are also fed until they can be independent. Especially for an animal that flies, a clutch of relatively large eggs is difficult for a parent bird to carry around while the embryos develop, so a central place can be useful. A nest can also help keep the young animals warm. However, there is a risk involved—predators often learn to focus on parental activity as a clue about nest location, and an entire clutch of eggs or brood of chicks may be wiped out. Similar statements apply to mammals that use nests or dens. Some mobile invertebrates, however, simply lug a batch of eggs around, carrying them on hooks or in folds or whatever.
Vivipary, on the other hand, might mean that young are born in a relatively advanced stage of development (compared to egg-layers), having been nurtured inside the mother for some time. But no, although some viviparous mammals are born fully capable of running or swimming, others are born in a totally helpless condition that requires weeks or even years of parental care. Furthermore, there are birds, such as ducks, whose young hatch from eggs in condition to run about and feed themselves.
Pregnant mothers carry the fetus wherever they go, enabling them to move around to find places with more comfortable temperatures or better food or safer refuges—all things that they could not do with eggs in a nest. That applies also to invertebrates that carry their eggs with them, wherever they go. But there are risks to the parent, too, if the developing young impair mobility or, in some cases, require the mother to have a special diet. Pregnant bears avoid the mobility problem because they den in winter and birth relatively tiny young (but run a risk from human predators that seek out their dens).
The bottom line seems to be that, although some good generalizations emerge, there is much variation that defies wide generalization. There are balances to be found, playing this advantage against that disadvantage, and they vary with circumstances. As usual, there are many questions to ponder, and some answers may emerge from studying the details of particular species.