So, I just skipped to the end of this, and wanted to share some insights I recently reached when waxing philosophically about the Mass Effect characters.
Disclaimer: I have only played through Mass Effect 1 and 2 once, on my bro's XBox, which he took with himself when he moved out, so that save is somewhat lost. Thankfully I bought a new laptop last Christmas, and have been working towards a similar save since then. I'm playing a male soldier, currently in ME1, romancing Ashley, in ME2 will romance MIranda. My only romance in the game was Miranda, for a very simple reason: I'm a Chuck fan, so Yvonne was definitely on the top of my list.
So, onto my conclusions about Miranda's character. These are probably not new, and am sorry if I'm repeating them, but I did not want to go through all 553 pages right now. Please excuse my laziness.
Now the meaty part finally:
Miranda is often perceived as a perfect little princess, whose major problem is "being perfect", and her detractors often accuse her of being spoilt, and that her problem pales in comparison to others'. I'm not going to argue yes or no, but I think Miri's issues are of a different nature. She has father issues. Yes, what an original conclusion, I know

. But here comes the important part:
Her problem is not being perfect. It's why she's perfect: because of her father, whom she despises. I think she believes she still lives in her father's shadow. All her achievements are because of her abilities and her training, both of which come from her father, she doesn't think she achieved anything on her own.
She was probably outmaneuvered ir outmanipulated by the Illusive Man, and that's why she's loyal to him as a second-in-command. By being inferior to someone, she feels human, and she can prove that her father was wrong, that she is not perfect.
And that's where Shepard comes in. Miri probably believed him or her to be a remarkable person, but with an overrated reputation that no real person can match. She was wrong. And now think about that, think about Shepard's possible backgrounds, her origins are relatively mundane in all cases, yet the war events show him or her to be exceptional. Miri was engineered and trained to be perfect, yet she is overshadowed someone who literally saved the universe and showed the galaxy what humanity can do. Miri thought of Shepard as a symbol, an icon, as she mentioned in the ME2 intro. Problem is, Shepard lived up to his/her reputation and status as a symbol. Miri is inferior to Shep, and that's why she feels comfortable with him/her, she feels normal next to Shep.
So, that's my idea, sorry if I overthought the whole thing.