Fun fact: herbivores actually can eat meat.
While they evolved to feed on plants, and so was their diet, they however opportunistically consume meat. It could come down to available, specific nutrient and they learn to from observing other animal that "these red thing is food"