Every time I see this sentence, I read it in a sassy/angry tone. xD
Like- "Why are YOU here!?"
«Почему ТЫ здесь!?»
What is the difference between asking this question and зачем ты здесь?
I maintain a personal dictionary of words I have learned from Duolingo. Почему and Зачем are next to each other in my dictionary, and they are the only words into which I have invested such notes as below. Please note, my etymology is highly suspect, but it helps me out a lot.
Почему - why (asks about the past, asks about the cause of something; think of “по” as a prefix asking, “by”, since чем comes from что, and so you are asking, “by what means?”)
Зачем - why (asks about the future, and asks about the purpose of something; think of “за” as a prefix asking, “behind”, since чем comes from что, and so you are asking, “what’s behind this?”)
I think the implication of the question, "Почему ты здесь?" is along the lines of, "What brought you here - did someone drop you off in their car?" If it were phrased instead, "Зачем ты здесь?", the implication would be, "What is your purpose for being here? You gonna rob the joint?"
The great answer, but... there is no difference between зачем и почему. Synonims.-)
Well, in some areas, they may be synonyms, but as they are being taught to us by Duolingo, there are differences. From the tips and notes for the Questions section:
Почему is used when asking a question about a cause of some event or action. It is a question that looks back at the past.
Зачем starts a question about the purpose of some action or some event that can have one. It is a question that looks towards a desired future.
In a few regions of Russia (Tatarstan, for example) people may use зачем for both questions if their usage of Russian is influenced by a major local language that makes no distinction between the two. In Standard Russian these are two clearly separate entities.
Почему ты опоздал? ‧ Why are you late? ( involuntary, inadvertent, undeliberate; what unforeseen intervention or disruption caused unwelcome lateness? )
Зачем ты опоздал? ‧ Why are you late? ( intentional, calculated, purposeful, deliberate; What is the motivation behind a planned lateness? )
За-че́м ‧ Why [ purpose inquiry - answer: In order to ‧ Чтобы ]
По-че-му́ ‧ Why [ cause inquiry - answer: Because ‧ Почему что ]
If you're asking why someone is here, wouldn't it make more sense to say "Зачем ты здесь?", because you're presumably asking about the reason, rather than the cause?