So far I have described the modern view of how the two brains work, but I said when I started that I would say more about how we got here. The next step in our journey is The Origin of Consciousness in the Breakdown of the Bicameral Mind. First published in 1976, this is the book that made the separation of the brains a big story. Research had shown throughout the 20th century that there was considerable difference between how the two brains worked, but Julian Jaynes provided the first comprehensive story about what the difference was and how we got here. Iain McGilchrist (Master and Emissary) credits Jaynes with raising the issue of two brains and speaking cogently about it, even if he has some disagreements with some of Jaynes' findings. If you are interested in how the two hemispheres came to be what they are today, you should read The Origin of Consciousness (OC) just to understand the issues, whether you believe his fantastic theory or not.
The first issue to consider is the meaning of consciousness. Consciousness is used to refer to many aspects of brain/mind function, and there are as many definitions of consciousness as there are psychological theorists. In order to understand The Origin of Consciousness, you must adopt Jaynes' definition of consciousness, if only temporarily. I happen to think his is a fine and useful definition, but it is certainly not the only one.
Julian Jaynes defined consciousness as the internal sense of "I" existing in time, with all the internal verbal conversations that come along with that. His definition is actually more complete and precise than that, and I encourage you to read OC to understand it more fully. His definition doesn't refer to cognition or creativity, just to the sense of self around whom all stories are built inside the mind.
Jaynes proposes that we didn't have that sense of self until about three thousand years ago. Before that, the sense of self and "I" didn't exist, in what he calls the "bicameral mind". About 1200 BC there started a revolution in how the mind works, referred to as "the breakdown of the bicameral mind". As a result of the breakdown, each of us gained a sense of self and new way of thinking. Internal human life changed dramatically, and the modern world was born.
All of this is highly improbable by any rational measure, yet it seems to be the only comprehensive theory of human consciousness and history of neurological function on the table. No one else has proposed, much less made headway with, a comprehensive alternative explanation of all the historical and modern evidence of who we are. I won't ask you to believe all this: it is just too fanciful. But you should consider it.