They didn't come back to life. According to the Mortal Kombat 3 wiki: "When Sindel is reincarnated in Earthrealm, Shao Kahn reaches across the dimensions to reclaim her, and as a result, Earthrealm gradually becomes a part of Outworld, instantly stripping billions of their souls. Only a few
are spared, as Raiden protects their souls." So Raiden was able to protect a few of them.
Edit: I just saw that you meant after
the invasion. I believe it's implied that once Shao Kahn is defeated (see Shang Tsung's ending for example) that the souls are released by Kahn back into the world.