You asked, "why does the pronunciation for 九 (9) change?" To answer that fully, we're going to have to dive into history a bit.
Readings: kun and on
The kanji 九 has the following standard readings:
- きゅう -- 音【おん】読【よ】み（呉【ご】音【おん】）
- く -- 音【おん】読【よ】み（漢【かん】音【おん】）
- ここの -- 訓【くん】読【よ】み
The kokono reading is classified as kun'yomi, literally meaning reading. Kun'yomi are readings based on the native Japanese word at the time the kanji was borrowed, that Japanese speakers thought best fit the meaning of the kanji character. Kokono isn't relevant for the term 九時, so we'll ignore kokono for the rest of this discussion.
You'll notice that there are two readings classified as on'yomi, or sound reading. On'yomi are readings that were borrowed originally from Chinese for their sound, hence the name.
Why there are different on'yomi
These borrowings happened at different times historically, which is where the sub-categories come from. Broadly speaking, goon represent the oldest layer of borrowings during the 400s and 500s, coming from the dialect of the ancient kingdom of Wu -- spelled 呉 in Chinese, and read as go in Japanese. The kan'on came later, during the 600s and 700s. Language changes naturally over time, and in addition, politics in China had changed, and so too had the prestige dialect. The speakers of the Chinese borrowed at this point called themselves 漢 instead of 呉. This 漢 character in 漢音 is read as hàn in modern Mandarin Chinese and kan in Japanese, and this is the character used as the name of the Han Chinese ethnic identity, reflecting that history. There's more about the different kinds of on'yomi here at Wikipedia.
Different readings (words) from the same root
This phenomenon, where a single character can have different readings, is basically the same thing as what we call a doublet in linguistics: two or more words (in this case, readings) that have arrived in the language from the same root, but via different paths.
This has happened in English, too. The words chief and chef both came into English from the same French root, but at different times historically, and this is reflected in the different pronunciations and usages. (More examples of English doublets here.)
The outcome: specific readings for specific contexts
Just as chief and chef have different usage patterns in English, so too do the different kinds of on'yomi in Japanese. Certain readings are only ever used in certain ways, tracing back to the vagaries of how the readings came into Japanese and the irregularities of how humans work with language. English speakers have to learn the differences in usage between chief and chef, just like Japanese speakers have to learn the differences in usage between 九【きゅう】 and 九【く】.