I have been thinking of this for the past couple of days.
Does the sentence sound naturally because it is grammatical or is it grammatical because it sounds naturally?
There's no single answer to that, but a key complication to consider is that we can have cases where it is difficult to say concretely that an utterance is not "well formed", but where it can still raise acceptability or performance issues. For example, the following (if I've worked it out properly :) doesn't break any of the usual structural relations between the elements of the sentence, but you'd probably agree that it sounds unnatural to the point where you can't automatically judge if it's grammatical or not:
The man that the cheese that the mouse that the cat caught nibbled poisoned died.
Then there are cases where our intuitions don't seem to tell us that a sentence is completely ill-formed or completely well-formed, e.g.:
Who did you wonder whether came?
Who were the mothers baked a cake by the children?
Or cases where a sentence appears to be well-formed according to basic structure found in the language, and not 'semantically odd' as such (not quite the same case as e.g. "The drunkenness murmured the atmosphere"), but where we seem to need to include some semantic element as part of our definition/constraints on grammatical structure:
??Four is known to be equalled by two plus two.
??David was fitted by the jeans but not the jumper.
(compare "The jeans but not the jumper fitted David", which is perfectly acceptable).
So... the answer is that there's some very blurry boundary between a well-defined "structure" to the language that defines "grammar" in its simplest case and some practical or other aspects of the language which also play a part.
I would say it is natural because it is grammatically stated. We hear good grammar all the time, so we get used to it and therefore it feels natural. Many natural statements aren't grammatically correct, such as "Everyone bring their own stuff". Therefore, natural statements don't mean it is grammatically correct, grammatical statements sound natural.