Different organisms have different metabolic pathways. Humans are unable to synthesize 9 of the 21 most common amino acids, and must acquire them from food. To learn more, look up "Essential Amino Acid".
Cows do it by having a complicated multiple-chambered stomach full of specialized bacteria that can digest cellulose -- basically a natural chemical engineering facility.