[If you have not played through all the endings of Undertale, you will be confused.]
Chara's plan was simple - poison herself without telling anyone, tell Asriel the plan on the deathbed, make him take her soul, go outside and get six human souls and break the Barrier.
What Chara wasn't expecting was that Asriel would refuse to attack the humans. And what Asriel didn't expect was that humans were capable of killing them.
And then, something SAVED both of them.
Now they're both stuck in Equestria - one has a voice in their head and pacifist tendencies, and the other is a guilt-racked mess - suddenly going home becomes a far-fetched idea.