From what I gather on the shunning beans side it's not necessarily just because cavemen didn't eat them but because they do have a decent amount of lectins in them, which can be irritating or downright poisonous to some people.
Cavemen didn't eat tomatoes, but I think most paleo folk do now.
"Paleo lifestyle has been pretty much debunked by science" - I don't agree, this is just not the case, in fact there hasn't been that much really good research on this subject yet, most research that is cited to "debunk" paleo style diets have had really poor protocols and actually weren't looking directly at paleo diets but at fat in diets (while not controlling for processed sugars, carbs and other factors). Plus, I can recall one study in particular that was using rats...not people.
I like to look at anthropology, paleontology and even recent history to try and decipher what we'd thrive best on. I figure if I eat mostly what I'd find or hunt or catch if I were suddenly thrown out in the woods, that's probably pretty close to what I should be eating. And I can be pretty safe tossing out the processed, man-made crap.
Look at the indigenous Aleut/Eskimo/Sami peoples - they have diets that are very high in meat and have some of the longest lived healthiest people.
I read the research on the Costa Rican population too and yes it's a totally different diet than say the Eskimo one...but still they on average live a long healthy life.
So what's the answer? I dunno - but I'm guessing that it's a number of things--
1. We are amazingly adaptable
2. Might have something to do with unprocessed foods of ALL KINDS
3. I've always suspected that diet and climate may have some correlation - such as populations in colder climates can use dietary fat more efficiently.