Why did Miranda die in my playthrough?
According to the German Mass Effect Wiki you have to tell her to talk to Oriana during her Loyalty Mission in ME2. If you didn't tell her to talk to Oriana Miranda always dies in ME3.
I can't find anything about this in the English Mass Effect Wiki and can't confirm it myself right now. So it would be great if somebody can check and confirm it.