As we already know, most of the people involved in making this movie didn't want Judy Garland in the title role, and when they were stuck with her they put the poor actor through hell. So how did she end up with the part in the first place? She had a friend in Arthur Freed - although whether she thought of his help in getting her the role was a favor in the end is anyone's guess.
The well respected producer and lyricist had enough sway within MGM to twist their arms and secure Garland in the role, because he was a keen admirer of her talents. The two had worked together previously on the hit Broadway musical 'Babes in Arms', in which Garland had demonstrated that she had both the charisma and the vocal ability to bring Dorothy to life.