So， a teacher explained to me that 究竟 is a more formal way of saying 到底. However, I'm still curious are there any other usage differences between the two? Is 究竟 only used in examples that are relatively “夸张” Ex。 你究竟为什么要离开我。
When used as an intensive, they are synomymous. Both translated as "on earth," "exactly."
究竟, 穷尽. literally means "investigate to the end." It can also be used as a noun which means "outcome," "final truth."
究 谋划;研究;探求. Study, investigate. Originally means "exhaust," "limit." See http://xh.5156edu.com/html3/15922.html
竟,终了，完毕. End, finish. See http://www.zdic.net/z/20/js/7ADF.htm
到底, 直到尽头. Literally means to "the bottom," "to the end."
We must fight on until the end.
This is described in more detail in the textbook 标准教程HSK4下 on pages 132-133, which says:
Similarity: Both can be used as adverbs in interrogative sentences of sentences with an interrogative word to indicate inquiry and strengthen the interrogative mood. Both can only be put before the subject if the subject is an interrogative pronoun.
Differences: "到底" can be used as a verb, meaning "till the end", while "究竟" has no such usage.
It also describes 究竟 as follows:
... It is often used in written Chinese. If the subject of the sentence is an interrogative pronoun, "究竟" can only be put before it.
The Chinese Grammar Wiki further highlights how 究竟 is more formal than 到底:
When someone asks you "what on earth are you doing?," "究竟 (jiūjìng)" is used by the speaker to intensify the question. In this case, 究竟 is similar to 到底. ... Note that 究竟 is more formal than 到底.
Expressing "in the end" with "jiujing"