The idea of a soul, or that there is an afterlife, is an ancient, if not immortal thought in and of itself, throughout the history of mankind. As archaeologists and other scientists peruse our past through artifacts and writings and buildings, religion and the afterlife have been recurring themes in almost every, if not every, culture. Ideas that there were gods, goddesses, and deity's that watched over us, showed pleasure or displeasure of our actions, sending harvests and plagues at a whim... and that one day, after our bodies perished, our soul would either be sent back to another earthly body, or be face-to-face with the god(s) to either be rewarded or punished.
So... where does that leave us? Why, again, do we derive a part of ourselves to be immortal when all our senses tell us all things pass away?
One of the most fundamental immaterial things about us, as people, is the ability to think. The ability to construct complex "thoughts" are quite immeasurable (despite what proponents of standardized testing would have you believe). They cannot be weighed, touched, smelled, heard, or seen. We can try to gauge how well our mind can process certain types of thought, but thought itself? Completely immaterial.
So the marriage of our physical selves with our nonphysical abilities and proof's of existence is certainly something that has been around for quite some time. But, while we can "think," and certainly our physical world shows proof of our abilities to do so, what cannot be shown, or has yet to be proven, is the "proof" or "ability" to live on past our physical bodies...
Most people, when they think of "I," or themselves, identify themselves through personality traits (i.e., I am caring, I am funny, I am shy...). People are their personalities. And your personality is your brain. But most people think of their brain as part of the mortal, or material, world. Not as their soul. And the soul is always intrinsically defined as that part of you, or you yourself, which will continue to live on after death, which in default includes your shyness, your funny bone, your dry wit. But if your brain is actually in control of these parts of ourselves which we deem as immortal, what is left for the soul to actually do or be?
The idea of afterlife only exists because, being as we cannot comprehend not existing, we therefore imagine a life for afterward, because we cannot fathom not thinking, not feeling, not existing. We cannot fathom not existing, and therefore, we must continue to exist even when all we know and all we see disappears or goes away...
Hence, the idea of a soul. Because, we know our bodies fail us. (Mine is failing me right now with a mid-summer cold!!) So we needed something separate from that, something that didn't depend on our bodies to carry us over to the great afterlife, the eternal bliss we imagine must be...