The brain primary function was to manage bodily functions. Little by little, more functions have been added to its job description, such as emotions in Brain 2. Then came the latest addition, Brain 3, which with its reasoning skills, solved major survival problems.
William Calvin in his Brief History of the Mind demonstrated that the brain attained its current size and anatomy long before humans started to use it for higher functions. Only later came the ability to throw with accuracy, to communicate using language, to think in logical terms, create societies, make technology what it is today.
An organization of the brain The Triune Brain is a theory from the 60s that tried to model the organization of the brain. It is technically inaccurate as an explanation for brain activity as neuroscience understands it but it remains one of the very few good approximations of what is going on in our head.