If we believe in reincarnation, why do we say that souls go to heaven for their final rest after they pass away? What's the point of praying for a soul if they might be right next to us down here on earth?

Answer:

When I was at school, a friend failed his end-of-year exams and had to repeat a grade. We all moved on but he was held back.

Some think reincarnation is like repeating a year at school: while some souls graduate to the next world, others are sent right back down to rectify things.

But that’s not quite how it works.

A better metaphor would be a mobile data rollover plan. The phone company gives you 5GB of data per month. Anything unused at the end of one month rolls over to the following month. So if you only used 4GB in November, the remaining 1GB is applied to your December allowance, giving you 6GB for that month.

Your soul has multiple gigabytes of spiritual energy and Divine potential. This is the power G‑d has invested in you to fulfill your mission in life. You use that potential by doing mitzvahs. Every mitzvah activates another gigabyte of your soul energy. You have been given an allotted number of days in this word to utilize your gigabytes.

At the end of the billing cycle, when your time comes to leave this life, the activated parts of your soul go to a higher place, because that part of you has completed its mission on earth. But if you have unused soul potential, if you didn't activate all of the energy invested in you, then that unused part of your soul comes back again in another body to finish the job.

So when someone passes away, we pray that their soul find rest in heaven, because that's where the already-used part of the soul is found. As for the unused part of the soul, it will come back down for another go-round.

Source: Arizal, Shaar Hagilgulim Chapter 14