Is there a difference between czemu and dlaczego?
Not really. But some people may find "czemu" a bit more colloquial, also some people (Hi mom!) tend to think that it is 'worse' because it's a Russicism. (cf. Russian почему)
Is not "dlaczego?" ("для чего?") a Russicism as well? :)
It sounds like that, doesn't it? But somehow it's not considered so...
Also, I think that дла чего is technically more like "po co" (what for).
Does Polish distinguish between ‘as a result of what causes’ and ‘for what purpose’ like Russian does?
I don't know Russian, but in Polish you can use Dlaczego as both
as a result of what cause= Z jakiego powodu?
for what purpose= W jakim celu ?, po co? na co?
Po co? (or more colloquial na co?) are common in spoken language
Shouldn't dlaczego be genetive as it is preceded by nie therefore is a negative sentence?
Dlaczego is neither a (pro)noun, nor an adjective, nor a numeral, so it's indeclinable.
I write the correct word for "why" and get "pay attention to the accents"??
There are no 'accents' in the Polish sentence... unless you put a special character somewhere in there accidentally. Without a report and/or screenshot we can't really guess what happened.