I never thought of it before, but once the question was posed, it began to bug me. Mental Floss has the answer.
[T]hey came from “Ut Queant Laxis,” a well-known hymn of the Middle Ages that was chanted for vespers. Each succeeding line of the song started one note higher than the previous one, so [Benedictin monk] Brother] Guido used the first letters of each word of each line: UT queant laxis, REsonare fibris: MIre gestorum , FAmuli tuorum: SOLve, etc. “Ut” was eventually deemed too difficult pronounce and was changed to “Do.”
Suddenly, The Sound of Music makes a little more sense.