There’s a principle in evolutionary ecology that can be expressed as “Jack-of-all-trades is master of none.” In order to efficiently exploit grass as a food resource, for example, requires some complex adaptations to the dentition and digestive system. Teeth suitable for grinding up grass are very inefficient for cutting up meat. A specialized grass-eater will out-compete a less specialized one (that is, all other things being equal, be able to support a higher population level) for that resource.
By specializing on a particular resource, specialists gain access to food that is not available to generalists because the latter lack the necessary adaptations to use it. And it’s simply not efficient/possible to specialize on too many things at the same time.
A raccoon, for example, is not an absolute omnivore, because it can’t survive on grass (and probably not on a pure vegetarian diet). Likewise, it is not nearly as efficient a predator as a cat: It probable would not be able to catch enough field mice or other prey to survive on them alone.