Nuns are not confessors, absolvers, ordainers, nor do they have any other sacramental or juridical authority in the way that priests, even those who are not pastors, have. So in what way is a nun like a psychiatrist or a priest?
Because of the authority the student would ascribe to them. A young impressionable student is not doing an ecclesiatical study, they would naturally defer to and respect a nun. My wife still speaks in reverential tones of the nuns who taught her. Other than her parents they clearly made the greatest impression on her and had the greatest influence on her as a young woman.