I recently reread the books and found it curious that when Harry goes into the Forbidden Forest, and is killed by Voldemort but comes back to life, that the piece of soul in him doesn't come back with Harry. Because Harry never fully reached a state of death, he was just in King’s Cross which served sort of like a purgatory and the part of Voldemort's soul was also there under the bench, so why didn't it stay connected to Harry and come back to life?
It wasn’t tied to life by Lily’s sacrifice like Harry was.
Harry was kept alive by his blood (and therefore his mother’s sacrifice) being in the Dark Lord’s body, which tied the both of them to life.
“He took your blood believing it would strengthen him. He took into his body a tiny part of the enchantment your mother laid upon you when she died for you. His body keeps her sacrifice alive, and while that enchantment survives, so do you and so does Voldemort’s one last hope for himself.”
- Harry Potter and the Deathly Hallows, Chapter 35 (King’s Cross)
The piece of the Dark Lord’s soul in Harry didn’t have this blood tie, so when it was hit by the Killing Curse, it simply died and didn’t come back.
The thing in King’s Cross wasn’t the soul in Harry - it was the main soul.
The piece of the Dark Lord’s soul that Harry sees in King’s Cross wasn’t the piece that had been in Harry - it was the main piece that returned to his body when he regained consciousness. J.K. Rowling said this clearly in the F.A.Q. of her website, and it was implied in the book as well.
What exactly was the mutilated baby-like creature Harry saw at King's Cross in chapter 35 of 'Hallows'?
I’ve been asked this a LOT. It is the last piece of soul Voldemort possesses. When Voldemort attacks Harry, they both fall temporarily unconscious, and both their souls - Harry's undamaged and healthy, Voldemort’s stunted and maimed - appear in the limbo where Harry meets Dumbledore.
- F.A.Q. on J.K. Rowling’s website
This is why Dumbledore says Harry has less to fear from returning to King’s Cross - Harry will return whole, but the Dark Lord will return in that mutilated form.
“But I know this, Harry, that you have less to fear from returning here than he does.’
Harry glanced again at the raw-looking thing that trembled and choked in the shadow beneath the distant chair.”
It’s also why Harry told the Dark Lord he’s seen what he’ll become without remorse.
“It’s your one last chance,’ said Harry, ‘it’s all you’ve got left … I’ve seen what you’ll be otherwise … be a man … try … try for some remorse …”
- Harry Potter and the Deathly Hallows, Chapter 36 (The Flaw in the Plan)
That specific piece of soul in King’s Cross did return to life - just in the Dark Lord, not in Harry.
Perhaps it is because that part is what the wand killed. But Harry had a choice to go back because the wand wasn't going to kill it's true master.