I’m not a grammarian but I suppose it’s simply that the word *cannot * doesn’t fit the usual pattern of negative interrogatives in English. For negative questions we generally use one of two patterns:
(1) The more formal Why - auxiliary verb - subject - not - verb ? e.g.
Why will she not call?
Why did he not come?
Why was the sun not shining?
Why could they not see?
(2) The more colloquial Why - contracted negative auxiliary verb - subject - verb? e.g.
Why won’t she call?
Why didn’t he come?
Why wasn’t the sun shining?
Why couldn’t they see?
Since *cannot * is one word, it can’t be split up into the second pattern above, and thus sounds odd when used in a negative question.
When you form a question, modal verbs like can move to the opposite side of the subject from where they are in a normal sentence. If negation is attached to the modal in the form of n’t, it gets dragged along; if not, it has to stay in its original position (cannot is spelled as one word, but the not doesn’t function syntactically in the same way as the n’t). This accounts for the current ungrammaticality of “Why cannot I go to the store?”
The awkwardness of “Why can I not go to the store?” is probably due to ambiguity as to what’s being negated–are you not able/allowed to go to the store, or are you allowed to not go to the store? “Why can’t I go to the store?” would be preferred as an unambiguous way of asking the question regarding the former.
(I apologize to those who know better if I’ve gotten something wrong…I’m a bit rusty.)