From what I know body and mind are two separate entities. Body cannot survive without a mind but is not the same case for a mind from what I know. When a person completely rids himself/herself of all the delusion and desire he/she becomes an arahant. An arahant ceases to exist when he/she passes away and nothing goes on or lingers and there are no more births. I am curious to know why this cannot happen as soon as becoming an arahant. Why does an arahant only cease to exist after death? How come the mind or sansara is extended to the point of which the body dies? Why doesn't the mind cease to exist as soon as attaining nirvana?
The mind cannot exist without a body except in the Arupa Brahma realms. Arahanths have no desire to die. So becoming enlightened does not imply that they have to immediately die. It's like when you are driving a car, if it runs out of fuel, it's not going to stop immediately. The momentum will take it some distance before stopping.
Mind never "ceases to exist" and to speculate as to what happens to a realized beings body/mind after a certain point is just as helpful as speculating what the view from the top of a mountain looks like.
However, in response to the more pragmatic elements of your question, if you consider that karmic effluents must invariably run their course, then even a realized being must "suffer the consequences" ... or in their case "enjoy the apparent consequences" of aeons of accumulation as they slowly wither.
Mind is stainless, and all the karmic imprints we have, whether they be bad or good, are temporary stains. However, without practicing Dharma, they will simply continue to accumulate and we will dive deeper into the chasms of samsara. With practice of virtue it becomes easier to meditate as our experience of reality becomes more pleasant and pure, and at this point it is more accessible to an ordinary being to get a glimpse of the true nature of the mind, which we all share and will always share.
Instead of speculating about the personal experience of someone who is realized, it would be better asked "who is this person experiencing these effects?" because the Buddha taught selflessness of the individual.
Self-grasping is the primary cause of our suffering. When we relinquish self-grasping by cultivating a mind that wishes to benefit other sentient lifeforms we are uncovering our basic nature. Basic in the sense that it is always there. It is also a priceless diamond, because realization of this nature halts rebirths in the lower realms (hells, animal) and guarantees eventual complete realization within so many lives.
From what I understand, it is possible for an arhant to have made many vows, and typically abide until the fulfillment of all their most heartfelt vows. This is good news for ordinary people like me, because without their help it would take a long time to realize the true nature of mind.
The question you pose, and not to nit-pick, but it is somewhat ill-formed because it assumes that there is a person who experiences the results of actions. This is always true until realization -- we shall inherit the effects and fruitions of all our actions when the right circumstances align. We will continue to experience all these until we have insight that pierces the veil of obscured knowing and effectively polishes our always-stainless gem.
We are all interconnected and we share a mind. With the cultivation of love and compassion we are helpfully benefiting those around us in myriad ways, and also breaking down the walls of delusion.
In short, ask not what happens, but how you can get there yourself.
At the point of becoming an arahat you enter Phala Samapathi. What ceases when you become an Arahat is Perception and Feelings (Vedana Sanna Nirodha). The mind is dependent on Perception and Feelings, hence the mind also stop functioning.
The mental function ceases when (while) you are in Phala Samapatti and Nirvana as the object.
When you come out of Phala Samapatti, an Arahat's mind starts to function again; but the difference is that a Arahat does not have roots, and Citta which have roots do not occur in an Arahat, hence does not create any new Karma.
As mentioned by others, an Arahat continue to exist due to momentum from past Karma until the end of life.
The answer lies in this sutta (the Kamabhu Sutta, SN 41.6):
Citta asked him a further question: "What is the difference between a monk who has died & passed away and a monk who has attained the cessation of perception & feeling?"
"In the case of a monk who has died & passed away, his bodily fabrication has ceased & subsided, verbal fabrication has ceased & subsided, mental fabrication has ceased & subsided, his life force is totally ended, his heat is dissipated, and his faculties are shut down.
But in the case of a monk who has attained the cessation of perception & feeling, his bodily fabrication has ceased & subsided, verbal fabrication has ceased & subsided, mental fabrication has ceased & subsided, his life force is not ended, his heat is not dissipated, and his faculties are bright & clear.
This is the difference between a monk who has died & passed away and a monk who has attained the cessation of perception & feeling."
So the reason according to Ven. Kamabhu is because you can achieve arahantship and still have your life force not ended, heat not dissipated, and faculties running.
it's because i think their past kamma (accumulated up until the moment of attainment) hasn't run its course as a result of the attainment
and even though at the moment of an arahant's physical death there may have been left inexhausted kamma from their previous births, this kamma cannot initiate a new birth due to lack of bhavatanha in the arahant
There are few things that should be taken into consideration before going any further.
What exactly is the reason for staying after reaching "Nirvana"?
When Lord Buddha (The first Arahat of all) reached the completion of realizing (Reached Nircana) a strange thing happened. The most powerful Deva of all "Mara" came to see Lord Buddha. This is the same Mara that challenged Lord Buddha before reaching Nirvana.
He said, Now you have reached your goal, So now please choose "Parinibbhana" (The name for the death of an Arahat).
Lord Buddha replied saying, Yes i have reached my goal but until my "Shasana" (Monks+Followers+teaching) is strong i will not choose "Parinibbhana".
Later in Lord Buddha's life this happened
Lord Buddha said this to his very faithful apprentice Ven.Anandha thero.. A lord Buddha can last the utmost amount of time a Human can in that particular era in kindness towards beings(Aayu Kalpa).
But Ven.Anandha thero's mind was Shadowed by the Same Villainous deva "Mara". So thero couldn't answer. But Lord Buddha repeated the same sentence. Still the mind Of Ven. Anandha thero was shadowed.
If an invitation is not given Lord Buddha's do not extend life Expectancy. So in this era "Mara" deva succeeded in that.
So it is clear that Venerable Arahats stay alive with Kindness Towards us.
Does Mind dissolve after Nirvana leaving a half alive mind?
Mind is a constantly generating and ceasing element. Ven. Arahats can control their minds at their will and therefore reaching Nirvana does not effect daily life.
For example the chief Arahat himself,Lord Buddha took time to admire Nature's Beauty all the while teaching Impermanance. There are many statements by arahats describing the beauty of the surrounding Forests and songs of the rivers.
Although you must know a rarely occurring incident which goes a bit different.
If a person reach Nirvana while being a Lay person and choose not to be a monk that person will choose "Parinibbhana" within 7 days. This has been stated as "Nature" of such an event.