The difference is in the way not
not affects the sentence due to the presence of the to
to.
Why (not to use) Magic Quotes.
(Why not) use Magic Quotes.
In the former, the not
not negates the to use
to use, making the meaning an explanation of why using Magic Quotes is not something you want to do.
In the latter, the not
not negates the why
why, making the meaning a rhetorical question