Robert J. Avrech is mostly correct, especially in terms of Audrey Hepburn’s unforgettable performance.
However, Sister Luke’s real struggle is that she wants to “help the poor” first and “be a nun” second.
She joined that particular order to precisely minister to the sick, and clearly finds the “religious stuff” like prayer and that a boring, time wasting distraction, when in fact it is meant to be the foundation on which one builds one’s ministry. She is doing everything backwards and is therefore frustrated at every turn.
That’s why she leaves at the end.