Cannibalizing behaviour in ants
Scientific name: Camponotus compressus

Common name: Common Indian black ant



Camponotus compressus tending soft scale insects growing on a stem



Source:


Common Indian black ant
Wikipedia


Cannibalism is common in social insects. It is a way through which they control the population of the colony and conserve nutrients. Members of Hymenotpera (this ant being one) are very quick to consume injured eggs, larvae and pupae. It has been experimentally observed that when a colony of Zootermopsis angusticollis(a species of termite) was kept on a diet full of cellulose i.e. deprived of protein, they attacked their own kind. But cannibalism dropped to zero when casein was introduced in their diet. So it is safe to  assume that these ants too engage in cannibalism for the same reason, proteins.

Reference: This book.