According to the Angus Beef Bulletin, cows probably eat the afterbirth to avoid attracting predators. Eating the afterbirth may also help the cow recover nutrients and bond with her calf though it is not necessary for either purpose.
"Afterbirth" is a common name for the placenta, a temporary organ that transfers nutrients and oxygen from the mother to the fetus and is usually expelled immediately following birth. Although eating the afterbirth may have some benefit for the cow, cows have occasionally choked and died while doing so. Because of this, some experts recommend removing the afterbirth so that the cow cannot eat it. Cows are not unique in eating afterbirth; most placental mammals do so.