Wow! I've been sloppy! Somehow, over the years, I'd managed to turn the Cake saying around in my head and no one's corrected me until now.
You're just being influenced by your language community. You've had a personal demonstration of how language evolves. As you and the websites pointed out, these days most people say it wrong and you unconsciously "learned" to say it that way yourself.
Fifty years ago I never came close to using "he and I" or "him and me" incorrectly. Nowadays so many people say it wrong that I've got the wrong versions etched into my brain. Sometimes I pause to make sure I'm saying it right, and not just the way the last ten people said it.
About how old is the phrase, "Good grief"? I remember it from Charlie Brown, and never thought to consider it could be older than that. I'd just thought it was an interesting oxymoron.
It's nearly impossible to track down because of the myriad references to the "Peanuts" comic strip. Since Charlie Brown started saying it, people have picked it up from him as a secondary source and that just complicates the search.
The only halfway authoritative source I could find basically did what I did and just took an educated guess. His guess was clearly better than mine because unlike me his eyes both work and he noticed that not only does "good" start with a G, but so does "grief." He guessed that it was what is called a
minced oath, a sanitized and de-blasphemed version of "good God," which we still hear people say frequently enough.
Minced oaths were more common back in the days when anglophones took blasphemy seriously, fearing the wrath of their god if they uttered an oath in vain and then failed to honor it. (If a 15th-century Englishman said, "I swear to God I'm going to rip your heart out," a wise man would run away.) The "gee" in "gee whiz" builds a minced version of "Jesus Christ!" "Jiminy Cricket" is an even closer approximation to the original.
"By God's wounds" was once a common way to swear an oath, referring to the punctures Jesus is said to have suffered during the biblical crucifixion story. Eventually the Brits, who unlike us Americans have a strong tendency to compress their language into fewer syllables ("extraordinary" only has two syllables in England), shortened that to "zounds." Since the O was sometimes twisted into a short A and the whole thing could be pronounced "gadzwounds," it was also minced into "gadzooks," which people still say for humorous effect today.