If all animals feed on plants, it would lead to an imbalance in the entire ecosystem.
Plants are a great source of oxygen that is essential for our survival. Most of the animals will die for food and even it will affect humans also.
Therefore, nature has already planned everything in a balanced way.
We have different types of animals based on their food habits - Herbivores eat only plants, Carnivores feed on the herbivores and Omnivores feed on both herbivores and carnivores.
This maintains the overall balance in the ecosystem.