I know 왜냐고요? means "Why (is it)?" but I don't understand the use of -냐고.
I've also seen it in 뜻이 뭐냐고요? = "What's the meaning?"
It's obviously from 이다. Is 고 a quoting mechanism?
무엇이다. 뭐다. 뭐 is shorten word of 무엇.
'-(느)냐고' is used to show to ask the question again or ask back.
And such as -(으)냐고, -는다고, -라고, -자고 have the same meaning.
무엇이다. 뭐다 (뭐 is shorten word of 무엇)
In this case, 무엇 can be a noun, phrase, or a sentence or paragraph.
무엇이-라고요? 뭐라고요?
뭐-라(고) 하셨습니까?
무어라?
뭬야?
무엇이-냐고요? 뭐냐고요?
뭐냐고 하셨습니까?
왜냐고요? or 왜요?
For example.
A: 인(人)은 사람이라는 뜻입니다.
B: 뭐라고요? 잘 못 들었습니다. 인(人)의 뜻이 뭐라고요?
A: 인(人)은 사람이라는 뜻이라고요.
A: 사람은 동물입니다.
B: 뭐라고요? 왜 사람이 동물입니까?
A: 왜 (사람이 동물이)냐고요? 사람은 동물에 속하니까요.
B: 왜요? 왜 사람이 동물에 속하냐고요.
A: 왜요? 그럼 동물이 사람이요? 어이구...