According to the Genki volume I grammar book (sorry I couldn’t find the page number) a negative question is the grammatical construct to invite someone to do something. The language is built this way.
Everyone’s already said that we basically do the same thing in English, so I’ll just add a slightly different spin to it: maybe it’s also because using a negative form is slightly less forceful and factual, so it sounds like a suggestion? Consider these two sentences (I’m not adding ‘do you want’ to the sentences because that keeps them closer to ‘行かない’):
Will you go to McDonalds?
Won’t you go to McDonalds?
The first is just a factual question: at some point in the future, will you head towards and arrive at McDonalds? The second sounds more wistful, and expresses a desire/expectation related to your going there.
If we translated your sentence literally, we would get 「マックに行きたい?」I think the issue with this question, even though it’s valid, is that it directly asks the person whether he or she desires to go to McDonalds. What if the person concerned doesn’t particularly want to go there, but would be happy to go there with you? What would he/she say then? A little awkward, no? On the other hand,「マック(に)行かない?」is a nice, non-confrontational way of asking the question, because as a negative form, it already feels hypothetical.