We know we just said this, but we feel it bears repeating. Judy Garland was perfect for this part in every way. It was the role of her career, it made her into a superstar, and it's one of Hollywood's iconic performances. But she wasn't the person that the studio or the director originally wanted in the part.
Shirley Temple was the name at the top of the original list. Temple would only have been ten years old at the time - a better match for Dorothy's intended age - and she was a more experienced performer with a bigger reputation. Depending on who you believe, either MGM backed away from her because they didn't believe she could carry the singing performances required, or her agent and mentor Daryl Zanuck turned the offer down because he wanted her to carry on making movies for 20th Century Fox instead.