Re-incarnation was invented for the same reason resurrection was invented. It is a way to provide meaning to the apparent futility of living lives that are going to end permanently. I suppose it's difficult for many people to be aware in and of life in such a great way only to face the prospect that it will all end in one gigantic grammatical period-end of sentence.
At least with resurrection you get to comeback as yourself. But, since there aren't too many people around that have returned to tell about it, resurrection has always been deferred to some remote future, filling up people with hope.
For a more immediate reward, reincarnation can explain those nagging moments of déjà-vu and more or less confirm that we existed before, thereby reinforcing the idea. But the scheme needs to be more elaborate in order to explain the reason why we need to come back in the first place as signifying more than just our whim to want to go on in a meaningful way. So we need to invent a purpose for reincarnation: to "refine" the soul (thereby inventing the soul); to learn the correct "life lessons"; to correct and atone for the wrongs we made; etc -- all the things we wish would have done in the first place.
I don't know how true this is, but many cultures that believe in reincarnation also think that one can come back as a fly or a cow. This is one of those "lessons" that reincarnation supposedly teaches us. It's like a cosmic Santa Claus saying that if you were bad, you get to come back as a cockroach. The forces that control that selection must have a hell of sense of humor.
Since very little consciousness seems to come back at reincarnation, what part of us does the learning and gets a do-over? That's rather nebulous for most of us. It may be some core emotional center or some fundamental ethical repository that makes us who we are. Well, devoid of personality, I don't see how that makes us individuals. It would then seem that if anything comes back, it's up for grabs by the first fetus that encounters it.
OK, let's say that some personality sneaks through in reincarnation. But that would also include memories. Well, there's your déjà-vu, the kind Shirley McLain has had so many of. Damn, I must be dead now 'cause I've never had any of those. I wonder if any members of a primitive tribe in the heart of the Amazon jungle have ever felt that they once were a Marquis at the court of Luis Philippe I back in 1835 France.