Well, to explain Rei's actions, we would need to take a deeper look in multiple aspects of the series, but I can try to give two main reasons.
- She warmed up to Shinji during the run of the main series, while realizing the treatment Gendo gave her wasnt real love (she assumed it was, as she had no real contact with human culture).
After Rei II died in episode 23, it's strongly implied she lost all her memories, but her soul was still the same, thus she subconsciously had affections for Shinji and despised Gendo.
In episode 24, she is seem casting an AT field from her own body, a feat of divine level in the series, which implies she is already finding her true place in the world. And this place bring us to the next point:
What is the Third Impact and Instrumentality (you said you are puzzled out): The process discussed by SEELE, Gendo and Fuyu strongly imply that triggering third is more than destroying the world.
It is revealed that Rei is actually the soul of Lilith, goddess from whom humanity came from, just like Kaworu was the soul of Adam, god from whom angels came from, and she is the key to start Third Impact.
When it happens, the one who triggers it, or is in the core of it all, gets to essentially become the god of Earth. SEELE wanted it to cause Instrumentality (the merging of all humans into one "sea of souls"), Gendo wanted it only to see his wife again.
- Said position of godhood is strongly implied to be chosen by
Lilith-Rei, and given how bad things were with Gendo, and how she had no one else, the only person she could trust giving all that power was Shinji.
Ultimately, it wasn't a great idea, because Shinji was very suicidal and completely broken at that moment, having lived the death of all his friends and metaphysical rejection by Asuka, he wished for death and instrumentality upon the world.
After a nice chunk of mind-fuck, he seem to regret his actions and tried to undo it, so people can leave if they want.