Check out my favorite primate:
The social brain hypothesis has it that group-living primates with complex social systems are smarter than less social primates, because just navigating the social minefield requires all sorts of cognitive abilities, which then spill over to non-social domains (tools, anyone?)
But then you have the semi-solitary orangutan, who has brains galore but just doesn't get the press of the slightly less smart chimpanzee. Orangutans may very well be the second smartest primates, after humans. How did that happen?
For one thing, semi-solitary is a bit misleading. Yeah, fully grown adults tend to prefer their own company to that of other adults - but do you know how long it takes to be an orangutan adult? Like 15 years, give or take. Young orangutans are intensely social, mostly with mom - but mom counts! And they look at each others' eyes a lot!
Plus young orangutans hang out with their peers and extended family, at least before the hormones kick in and they just want to be left alone. And what is happening in all these interactions with mom, siblings, and the neighbors? Intense social learning.
Living in the jungle is hard: building nests every evening, extracting the nutritious stuff from thousands of plants. That takes deliberation, reasoning, inference, problem-solving, weighing the pros and the cons. And it also takes paying close attention to your family and friends (not counting dead-beat dad). In other words: social learning, cultural transmission and a big brain.
References:
Damerius, L. A. et al. Orientation toward humans predicts cognitive performance in orang-utans. Sci. Rep. 7, 40052; doi: 10.1038/srep40052 (2017).
Forss, S. I. F. et al. Cognitive differences between orang-utan species: a test of the cultural intelligence hypothesis. Sci. Rep. 6, 30516; doi: 10.1038/srep30516 (2016).