Start the story from the beginning
When we think of our ancestors, we tend to think of our immediate ones that looked like us, talked like us, and ate diets very similar to ours. The problem with thinking this way is that it starts the narrative halfway through the story. The story doesn't begin with a somewhat modern human with an ape face chasing down game, it begins with a primarily herbivorous primate that was likely incapable of hunting or attaining any meat outside of scavenging dead carcasses. Ok, you got me, it actually begins much further back with a single celled organism, but since their diets didn't consist of food as we look at it today, what they ate doesn't really provide us with concrete evidence as to what we should eat...or does it? More on that later.So here we have an herbivore who is competing for food against other herbivores in a constantly changing climate that is ultimately responsible for all of the mass extinctions save for the dinosaurs. Being able to eat different foods is not a novelty of an animal living in this world, it's a survival necessity. When competition was tough or the climate changed the foods that were available, having fallback foods that are not typically parts of the native diet can be crucial to survival. While scavenging the remains of dead carcasses may be the first thing that comes to the mind in Paleo world, another one is the consumption of underground storage organisms, also known as roots and tubers.
To get at roots and tubers, you need a couple of traits that these early primates likely didn't have. First, they would have needed the intelligence to be able to identify them as potential food sources, despite the food portion being located underground. Second and more importantly, it would require the use of tools to dig them out. Using a stick to dig a tuber out of the ground was likely one of the first steps in the use of tools, even if it's not it certainly predated the making of hunting tools such as spears, atlatls, and bows. So here we likely have a point in time where a small offshoot of the primates started consuming these fallback foods when the components of their primary diet were not available. However, being fallback foods, they still weren't the bulk of the diet when all food was available.
Fallback foods and evolution
Over time our diet likely changed immensely as our ancestors evolved in to something more human-like, but we started as an herbivore and that is likely what our diet should be made mostly out of...plants. When you look at fallback foods, most of them have some sort of importance in to what we evolved in to because those that didn't eat these fallback foods likely evolved in to something else or disappeared altogether. This doesn't mean that a fallback food that helped get us to where we are should become the staple portion of the diet. In fact, if you are arguing for Paleo you really can't do that. Grains and legumes began as a fallback food and were likely necessary to get us where we are now. This doesn't mean that ad libitum grain consumption should be your goal, and in the same way it doesn't mean ad libitum meat or protein consumption should be either.To clarify what I mean, I have to go in to the microbiome, teh collection of bacteria located in your GI tract. When a person switches from an entirely plant matter diet to an entirely animal matter diet, as would happen when the dry season or winter comes, the microbiome changes drastically and very quickly(1). As this happens, your microbiome is adapting to the foods that are available and changing what is happening in your body by changing it's inputs, and changing inputs changes outputs What we tend to see in this scenario is a change from mostly carbohydrate/fiber fermenting bacteria to mostly protein/amino acid fermenting bacteria. This change, in theory, will lead to increased intestinal permeability as the butyric acid used to seal up and repair tight junctions between cells in your digestive tract won't be produced as it is a byproduct of bacterial fermentation of fiber in your colon. This, in turn will increase systemic inflammation which sounds like a bad thing, but in the context of low food availability it is actually a beneficial trait.
With increased systemic inflammation, comes insulin resistance. In today's world this is bad because we have unfettered access to all types of foods, but several thousand years ago it probably activated the thrifty genotype that is associated with more efficient fat storage and more energy extraction which is beneficial when food is low. This process is described by Jeff Leach in a blog on his website discussing the effect of a low carb diet on the microbiome and another one where he discusses the Paleo diet and obesity located here. In the grand scheme of things this got us to where we are today, but that doesn't mean that it doesn't contribute to the problems we see in a completely different food environment.
If we flash forward many moons, grains and legumes likely had the same impact on farmers. Here we have an easily storable source of nutrients that can last through even the longest winter, and it just so happens that they have proteins that humans have difficulty breaking down. The result, a steady flow of substrate to bacteria in the colon that ferment amino acids and increase insulin resistance in a time where it is beneficial. Again, beneficial when food is scarce, not so beneficial when food is plentiful.