adverb
Standard question word asking for a reason or cause. Can be used in both formal and informal contexts.
なぜ遅れたのですか。
Why were you late?
なぜそう思うの?
Why do you think so?
The word なぜ is a native Japanese interrogative. The kanji spelling 何故 is a jukujikun reading, where the characters are assigned based on meaning rather than sound.