Animals have developed a taste for different types of food so that there is less competition for that animal or plant. Think about Pandas- they basically eat toothpicks half of the day, but they keep on kicking.
Its the way the whole ecosystem works and how it stays in control and doesn’t spiral out of control. Herbivores have evolved to feed off the plants, and carnivores have evolved to feed off them and control the population of other animals. Omnivores eat everything, filling in the grey area!
Although sad to watch at time carnivores are hugely necessary to keep a balanced ecosystem. A great example of a species growing out of control a few years ago was in Tierra del Fuego, the southernmost islands of South America. Someone introduced a few dozen beavers down there, but there were no natural predators for them so they spiralled out of control, there are now hundreds of thousands of them and about half of the forests down there have been destroyed as a result of beavers. You need that balance!