Filial cannibalism
Filial cannibalism occurs when an adult individual of a species consumes all or part of the young of its own species or immediate offspring. Filial cannibalism occurs in many animal species ranging from mammals to insects, and is especially prevalent in various species of fish. Exact evolutionary purpose of the practice in those species is unclear and there is no verifiable consensus among zoologists; it is agreed upon though that it may have, or may have had at some point in species' evolutionary history, certain evolutionary and ecological implications. Types

Total
Total or whole clutch cannibalism occurs when a parent consumes its entire brood. This usually occurs when a brood is smaller or of lesser quality. The most obvious purpose of total or whole clutch cannibalism is the termination of care for the parents. The main benefit of this action can only be an investment in the future reproduction of potentially larger or healthier broods. Partial
Partial clutch cannibalism occurs when a parent consumes a part of its offspring. "Parental manipulation of brood size may allow the parent the maximize lifetime reproductive output by adjusting current reproductive costs in favour of future survival and subsequent opportunities for reproduction." Unlike total or whole clutch cannibalism, partial clutch cannibalism invests in both current and future reproduction. Male parents, particularly male fish, may eat some of their offspring "complete his current parental cycle, and remain in sufficiently good condition to engage in further breeding cycles." Benefits

Satisfies current energy or nutrition requirements
In a non-reproductive environment, is a way to recoup reproductive investment
Puts evolutionary pressure on offspring to make the offspring develop quicker
May increase the reproductive rate of a parent by making that parent more attractive to potential mates
Gets rid of offspring that take too long to mature, allowing the parent to halt parental and resume reproductive behavior quickly
Removes weaker offspring in an overproduced brood, which makes the other offspring more likely to succeed
Reduction of sick, parasitized, or non-viable offspring. Costs

Loss of immediate fitness
Transmission of diseases and parasites

Social factors 
Competition among a species for resources, mating opportunities, and reproductive dominance are all promoters for filial cannibalism. To compete well in a certain species' social structure, a parent may be compelled to practice filial cannibalism to limit the amount of energy and time they spend raising their young. Males may compete for mating opportunities by eating the offspring of a female to make that female more sexually receptive or to re-mate. By doing this, a male might be able to prolong its lifetime mating opportunities. Female fish may compete for mating opportunities with males by raiding the male's nest and eating the eggs inside. Females may also use cannibalism – particularly birds and bees that live in a joint-nesting social structure – as a way to establish reproductive dominance by eating the eggs of a co-breeder. In some animal cultures, competition may lead to instances of egg thievery, nest takeovers, and cuckoldry. However, the consumption of an animal's brood is often more beneficial than the consumption of unrelated conspecifics, since it takes less energy to eat their own offspring and lessens the chance of getting their own brood raided when getting food while away from their offspring. Filial cannibalism in fish 
Many species of fish with paternal care will exhibit total clutch cannibalism or partial clutch cannibalism. This is likely in order to gain additional energy and nutrients, which could ultimately benefit their future reproductive success. Cannibalized offspring can act as a food source for the male fish guarding them. Often, male fish will consume their entire clutch if it is too small, as the energetic costs of caring for a small clutch may be greater than their reproductive benefits. In other fish, filial cannibalism has been observed to regulate male fish's endocrine systems. For example, in the blenniid fish Rhabdoblennius nitidus, males have an androgen-dependent brood cycle. However, the acquisition of eggs suppresses the secretion of androgen, preventing males from performing courtship displays and obtaining more offspring. As a result, R. nitidus males will cannibalize all their eggs when the clutch size is small, so they can reproduce and care for a larger clutch of eggs (and subsequently have more offspring). In some cases, the size of the clutch seems to determine whether the male consumes the entire clutch or only part of it. For example, in the fantail darter, males seem to consume a fixed number of eggs regardless of clutch size, which may be in order to cover the energy costs of guarding the eggs. Since the cost of parental care does not increase significantly with a larger clutch size, having small clutch size may not be worth amount of care invested in it. This is further compounded by the fact that in the fantail darter, females prefer males who have already mated and are guarding young eggs, possibly because it would reduce the risk of her eggs being consumed by the male. Specifically, females prefer males with young eggs over old eggs, so caring for smaller broods of older eggs may have little to no net benefit to the male. As a result, smaller clutches may end up being entirely consumed. Filial cannibalism in insects 

Filial cannibalism can act in a way analogous to brood reduction in birds, in order to reduce competition between offspring for resources and maximize the survival of fully-developed healthy offspring. For example, the burying beetle Nicrophorus vespilloides exhibits partial filial cannibalism. Burying beetles bury the bodies of small vertebrates as a food source for their offspring; for N. vespilloides, eggs are scattered a few centimeters away from the corpse. Once they hatch, the larvae make their way to the corpse to feed while supervised by their parents. Clutch sizes can be much larger than the corpse can support, which researchers suggest is due to eggs being laid as insurance for unexpected mortalities, parents being unable to accurately estimate the food capacity of the corpse, or parents being physically constrained to a minimum clutch size (though studies have shown that parents will vary the size of their clutch based on the amount of food available). At higher densities with insufficient food, larvae may not develop completely, resulting in smaller adults that are less likely to find a mate, as well as limiting the maximum clutch size that can be laid. The parents thus kill part of their brood at the earliest stage to maximize the food available for the others. Filial cannibalism can also serve as a source of energy while simultaneously removing nonviable eggs, such as those that have been parasitized. In the assassin bug Rhinocoris tristis, males are more likely to consume eggs at the periphery of the brood, which are most likely to be parasitized by wasps and are also the easiest for the male to access. Although R. tristis cannot distinguish between parasitized eggs and nonparasitized eggs, their preference for feeding on peripheral eggs may be a general behavior to maximize the chances of feeding on nonviable, parasitized eggs. In addition, it would reduce the number of peripheral eggs available to parasitic wasps, forcing them into an inner egg where guarding males are more likely to see and fight them off, which could potentially kill the wasp. Furthermore, eggs served as a source of energy due to the costs of parental care, such as reduced efficiency in feeding and energy used to fend off attackers. R. tristis males also guard adopted broods without a higher rate of cannibalization, suggesting that they cannot discriminate between their own eggs and unrelated ones. See also
Child cannibalism
Child sacrifice
Human placentophagy

References

Animal cannibalism