My theory is that I think all of the girls (except JiU of course) needed to be saved from being evil and the only way for them to turn back to being good and being JiU's friends again is that she had to kill them one by one.
When she killed them, she came back to the real world and all of her friends were there, alive...or so it seemed until they all vanished into petals, so when JiU saw that she hadn't saved them, she wanted to kill herself but luckily the gun didn't have any power in it.
So, then she found out about where the girls were and saw that they were being held captive and all unconscious and the only way to rescue them was if she sacrificed herself with the big crystal, so that is what she did and the girls woke up to find that JiU had saved them and had died for them.
Obviously, this theory may not be true but it's the best one I could think of lol