Here's why:
* Interrogative sentences ask a question. This sentence clearly asks a question about the reason for studying late at night.
* They typically begin with an interrogative word (like "why" in this case).
* They end with a question mark. This sentence has a question mark.