I know why she came
I know why she came.
I don’t know why he spoke about it.
Tell me what you heard.
I want to know how you won.
When a question is the second part of the sentence, we don’t use do or did. So it is not correct to say I know why did she come.
You can see more examples in the book The Little Prince.